Which Page should return ClickableElement.click()?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Which Page should return ClickableElement.click()?

Marc Guillemot
Hi,

currently the javadoc of ClickableElement#click() says:

-------
@return The page that occupies this window after this element is
clicked. It may be the same window or it may be a freshly loaded one.
-------

This description is by itself not really correct AND the current
behavior is not this one (many unit tests rely on it). For instance
clicking a link that loads a page in an other frame or window returns
the newly loaded page in this other window. It becomes more complicated
when javascript is involved and more than one window is (re)loaded.

I think that current behavior is quite natural (perhaps not yet fully
consistent) and that the javadoc should be fixed to reflect this.

In discussion for issue 1587110
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1587110&group_id=47038
we came to the point that ClickableElement#click() should return the
page having the focus (let's see how easy it is to determine).

Does anyone see some drawbacks of such a (mostly javadoc) change?

Marc.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop