Skip to content

Commit fb4c62e

Browse files
ggkiokasdiemol
andauthored
Update docstring of wait.py so it can also cover the case of WebElement as 1st arg of WebDriverWait. (#12376)
Update wait.py The 1st argument can be either Instance of WebDriver or a WebElement. If it is a WebElement it can be used to get another element using as base the the previous one and having a relative locator. The logic is identical with: relative_element = base_element.find_element(By.XPATH, "./relative_xpath") Co-authored-by: Diego Molina <[email protected]>
1 parent b22d08d commit fb4c62e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • py/selenium/webdriver/support

py/selenium/webdriver/support/wait.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(
3737
"""Constructor, takes a WebDriver instance and timeout in seconds.
3838
3939
:Args:
40-
- driver - Instance of WebDriver (Ie, Firefox, Chrome or Remote)
40+
- driver - Instance of WebDriver (Ie, Firefox, Chrome or Remote) or a WebElement
4141
- timeout - Number of seconds before timing out
4242
- poll_frequency - sleep interval between calls
4343
By default, it is 0.5 second.

0 commit comments

Comments
 (0)