Skip to content

Commit

Permalink
[py] WebDriverWait: update documentation for until and until_not (#6711)
Browse files Browse the repository at this point in the history
  • Loading branch information
native-api authored and lmtierney committed Dec 5, 2018
1 parent 74fb9c5 commit 176a45b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions py/selenium/webdriver/support/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ def __repr__(self):

def until(self, method, message=''):
"""Calls the method provided with the driver as an argument until the \
return value is not False."""
return value does not evaluate to ``False``.
:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
screen = None
stacktrace = None

Expand All @@ -81,7 +87,14 @@ def until(self, method, message=''):

def until_not(self, method, message=''):
"""Calls the method provided with the driver as an argument until the \
return value is False."""
return value evaluates to ``False``.
:param method: callable(WebDriver)
:param message: optional message for :exc:`TimeoutException`
:returns: the result of the last call to `method`, or
``True`` if `method` has raised one of the ignored exceptions
:raises: :exc:`selenium.common.exceptions.TimeoutException` if timeout occurs
"""
end_time = time.time() + self._timeout
while True:
try:
Expand Down

0 comments on commit 176a45b

Please sign in to comment.