I am using the HttpUnit to simulate the submit button click of the form that designed into the specified url. (I am using http://stu21.kntu.ac.ir/Login.aspx). I use the code as follow to get response page.
WebConversation conversation = new WebConversation();
WebRequest request = new GetMethodWebRequest("http://stu21.kntu.ac.ir/Login.aspx");
WebResponse response = conversation.getResource(request);
WebForm loginForm = response.getForms()[0]; //Form has been got successfully
request = loginForm.getRequest();
request.setParameter("txtusername", "8810103" );
request.setParameter("txtpassword", "8810103" );
response = conversation.getResponse( request ); //error while getting the .js
It has the problem when wants to get the java script file, and error is
Exception in thread "main" com.meterware.httpunit.ScriptException: Script 'var shuffleArray = new Array();
So, how can i get rid of this problem ? It prevents my program to load the result page.