From: Marc G. <mgu...@ya...> - 2005-08-17 13:35:37
|
Seems that hmlunit/Rhino doesn't like your js. Can you reduce your js code to the minimal one producing this effect and open a bug issue for this? Marc. kishore wrote: > Hi All, > > While testing a website I set the password and when I > click on submit the app goes into an indefinite loop. The same works > properly when I do the operations in IE. After clicking on submit the > page which opens up has 3 frames inside the page. Is having multiple > frames supported in htmlunit > > > > This is my source code > > public void testHomePage() throws Exception { > > final WebClient webClient = new WebClient(); > > webClient.setRedirectEnabled(true); > > final URL url = new URL("http://localhost:8094/pi"); > > boolean isloaded=false; > > HtmlPage page ; > > page = (HtmlPage)webClient.getPage(url); > > HtmlAnchor > aref=(HtmlAnchor)page.getFirstAnchorByText("Sign In"); > > final HtmlPage page2=(HtmlPage)aref.click(); > > final HtmlForm form = page2.getFormByName("login"); > > final HtmlSubmitInput button > > = > (HtmlSubmitInput)form.getInputByValue("Sign in"); > > final HtmlInput textField > > = (HtmlInput)form.getInputByName("passwd"); > > textField.setValueAttribute("kk"); > > final HtmlPage page3 = (HtmlPage)form.submit(); > > aref=(HtmlAnchor)page.getFirstAnchorByText("New Document"); > > assertEquals("New Document", aref.asText() ); > > } > > When it tries to execute the form.submit it tries to load the page which > has 3 frames and then it goes into an indefinite loop. > SEVERE: runtimeError: message=[Too deep recursion while > parsing] sourceName=[/pi/common/scripts/actionMgr.js] line=[72] > lineSource=[null] lineOffset=[0] > > > > Is this scenario handled in HTMLunit. If yes. What mistake am > I making? > > > > Thanks, > > Kishore > |