[py] WebDriverWait: update documentation for until and until_not
@@ -61,7 +61,13 @@ class WebDriverWait(object):
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
@@ -81,7 +87,14 @@ class WebDriverWait(object):
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:
