From: <Mik...@su...> - 2003-02-19 17:41:13
|
I have a need to simulate the browser refresh button. I.e. I want to reload a page. I don't see a direct way to do this in HtmlUnit 1.1. Is there something that I am not seeing? Assuming there is not, one simple way to partially solve the problem is to add the following function to HtmlPage: /** * Return the url that was used to load this page * * @return See above */ public URL getUrl() { return originatingUrl_; } However, this will only work for pages that are a result of a HTTP Get requests. It will work for pages that were a result of a Post request, because the URL will not contain the request parameters. Therefore a more complex solution is needed to solve the problem entirely. Thoughts? Mike Bresnahan |