From: <ddk...@ki...> - 2005-05-09 19:37:11
|
What do you mean that you can't "recover the mailBox url" in Gmail? Are you talking about the initial URL that "loads" the inbox, like this: http://gmail.google.com/gmail?&ik=&search=inbox&view=tl&start=0&init=1&zx=xsrkd6-mkd75r In order to "catch" that, you'll probably have to turn off either JavaScript or redirects (or both). Assuming you have an HtmlPage object (NOTE: method names are from memory; they may be slightly different): WebClient webClient = htmlPage.getWebClient(); webClient.setRedirectEnabled(false); webClient.setJavaScriptEnabled(false); You'll have to do this AFTER you load the initial page, but BEFORE you submit the "Sign In" button in the Gmail example. Are you assigning the output from the submit() method after you submit the form? That will be the resulting html page. Dave On Mon, May 09, 2005 at 06:18:14PM +0200, Gael Harbonnier wrote: > Hi, > > I work on an application that automates the forms' filling and display the > result page on a swing component. It's possible thanks to HtmlUnit but I > need to recover the resulting web page to continue to navigate. the method > asXml can't give me an online way to display the page and > getFullyQualifiedUrl is useless with some websites (like gmail: try to > automate the login form, you can't recover the mailBox url). Could you help > me ? > > Thanks, > > Gael |