PROBLEM:
---------
(1) There are 3 forms on "https://www.shopping.hp.com/cgi-bin/hpdirect/shopping/scripts/profile/signin_view.jsp"
page [1.qsrSearch 2.searchTop 3.signinForm] but when I run the code the code is only able to get form 1 & 2 it does not find "signinForm"......can anybody help me out with this......
(2) This code works fine sometimes but sometimes same code throws an "java.io.IOException" .... though I am not sure it seems to be related to sessions....can anybody help...
CODE:
-----
import java.net.URL;
import java.security.Security;
import com.meterware.httpunit.*;
public class SignIn {
public static void main(
String[] args){
String host = "www.shopping.hp.com/cgi-bin/hpdirect/shopping/scripts/home/home.jsp";
WebConversation wc = new WebConversation();
WebRequest request = new GetMethodWebRequest("http://" + host);
try{
WebResponse response = wc.getResponse(request);
WebConversation wc1 = new WebConversation();
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
HttpUnitOptions.getExceptionsThrownOnScriptError());
WebRequest SignIn_request = new GetMethodWebRequest("https://www.shopping.hp.com/cgi-bin/hpdirect/shopping/scripts/profile/signin_view.jsp");
WebResponse SignIn_response = wc1.getResponse(SignIn_request);
WebForm SignIn_form [] = SignIn_response.getForms();
for (int i=0; i<SignIn_form.length; i++)
{
System.out.println("FORM NAME : " + SignIn_form[i].getName());
}
}
catch(Exception e){
System.out.println("EXCEPTION : " + e);
}
}
}
PROBLEM:
---------
(1) There are 3 forms on "https://www.shopping.hp.com/cgi-bin/hpdirect/shopping/scripts/profile/signin_view.jsp"
page [1.qsrSearch 2.searchTop 3.signinForm] but when I run the code the code is only able to get form 1 & 2 it does not find "signinForm"......can anybody help me out with this......
(2) This code works fine sometimes but sometimes same code throws an "java.io.IOException" .... though I am not sure it seems to be related to sessions....can anybody help...
Thanks in Advance.....