From: Mike B. <mb...@Ga...> - 2003-08-16 17:16:17
|
Steve Corwin wrote: > I've succeeded in making a HtmlUnit test that logs into my web app. > The response page is divided into 3 frames. How can I get the > contents of a frame so I can verify them? I've tried calling various > functions, but I > can't find one that will return the contents: > > oFrame: HtmlFrame[<frame name="leftPane" noresize="" src=":leftPane">] > oFrame.asText(): > oFrame.asXml(): <frame name="leftPane" noresize="" src=":leftPane"/> > oFrame.getChildElements(): [] > webClient.getWebWindowByName("leftPane"): HtmlFrame[<frame > name="leftPane" noresize="" src=":leftPane">] All the various frames are subclasses of WebWindow which has the method getEnclosedPage(). Assuming that the page is html, it will return an HtmlPage object which will have the content you are looking for. Does this help? -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |