Skip to content

Commit cb0d713

Browse files
hjwpandreastt
authored andcommitted
java: mention native events in docs for WebElement.click
Signed-off-by: Andreas Tolfsen <[email protected]>
1 parent 27a959c commit cb0d713

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

java/client/src/org/openqa/selenium/WebElement.java

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
Copyright 2007-2009 Selenium committers
3-
Portions copyright 2011 Software Freedom Conservancy
3+
Portions copyright 2011-2015 Software Freedom Conservancy
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -30,17 +30,23 @@
3030
*/
3131
public interface WebElement extends SearchContext {
3232
/**
33-
* Click this element. If this causes a new page to load, this method will attempt to block until
34-
* the page has loaded. At this point, you should discard all references to this element and any
35-
* further operations performed on this element will throw a StaleElementReferenceException unless
36-
* you know the element and the page will still be present. If click() causes a new page to be
37-
* loaded via an event or is done by sending a native event then the method will *not* wait for
38-
* it to be loaded and the caller should verify that a new page has been loaded.
39-
* <p>
40-
* There are some preconditions for an element to be clicked. The element must be visible and
41-
* it must have a height and width greater then 0.
33+
* Click this element. If this causes a new page to load, you
34+
* should discard all references to this element and any further
35+
* operations performed on this element will throw a
36+
* StaleElementReferenceException.
4237
*
43-
* @throws StaleElementReferenceException If the element no longer exists as initially defined
38+
* Note that if click() is done by sending a native event (which is
39+
* the default on most browsers/platforms) then the method will
40+
* _not_ wait for the next page to load and the caller should verify
41+
* that themselves.
42+
43+
*
44+
* There are some preconditions for an element to be clicked. The
45+
* element must be visible and it must have a height and width
46+
* greater then 0.
47+
*
48+
* @throws StaleElementReferenceException If the element no
49+
* longer exists as initially defined
4450
*/
4551
void click();
4652

0 commit comments

Comments
 (0)