HI,
i'm a newbie and have a problem.
I try to login to a webapplication.
My code:
public void testLogIn( ) throws Exception
{
try
{
final WebClient webClient = new WebClient();
webClient.setRedirectEnabled(true);
final URL url = new URL(Constants.BASE_URL);
final HtmlPage loginPage = (HtmlPage)webClient.getPage(url);
assertEquals("Login-Page", loginPage.getTitleText());
final HtmlForm form = loginPage.getFormByName("loginForm");
final HtmlImageInput button =
(HtmlImageInput)form.getInputByName("login");
final HtmlTextInput userInput = (HtmlTextInput)
form.getInputByName("username");
final HtmlPasswordInput pwdInput = (HtmlPasswordInput)
form.getInputByName("password");
userInput.setValueAttribute(Constants.USER1_2);
pwdInput.setValueAttribute(Constants.PASSWD);
assertEquals( Constants.USER1_2, userInput.getValueAttribute() );
assertEquals(Constants.PASSWD, pwdInput.getValueAttribute());
assertEquals("login", button.getNameAttribute());
webClient.setRefreshHandler(new WaitingRefreshHandler());
final HtmlPage mainPage= (HtmlPage)button.click();
assertEquals("Welcome", mainPage.getTitleText());
System.out.println(mainPage.getTitleText());
final HtmlFrame navigFrame = (HtmlFrame)
mainPage.getHtmlElementById("cmnavig");
....
}
catch(Exception refreshhandler)
{
System.out.println("Fehler: " + refreshhandler);
}
The result is: java.lang.OutOfMemoryError: Java heap space
Where is the problem in my code?
thank's in advance
Daniel
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@...
https://lists.sourceforge.net/lists/listinfo/htmlunit-user