From: Brad C. <yo...@br...> - 2004-10-04 19:01:28
|
It's a bit of a road to find it, but it's in there :) This is how my framework handles it: private WebClient getClient() { return this.client; } private Page getCurrentPage() { return getClient().getCurrentWindow().getEnclosedPage(); } public String getCurrentURL() { return getCurrentPage().getWebResponse().getUrl().toExternalForm(); } Brad C --- "Brehm, Robert P" <rob...@of...> wrote: > Brad C, > > Looking at the URL from the WebClient would probably work. I have looked thru the > JavaDocs and have not found a method yet that will give me the URL. Would Can you > please advise? Also, I am wondering if a listener for WebConnection events is in > the works for a future generation of HtmlUnit? > > Regards, > > Bob Brehm > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |