diff --git a/py/selenium/webdriver/support/expected_conditions.py b/py/selenium/webdriver/support/expected_conditions.py index f418a214e3b49..ad1c3e82129bb 100644 --- a/py/selenium/webdriver/support/expected_conditions.py +++ b/py/selenium/webdriver/support/expected_conditions.py @@ -491,7 +491,7 @@ def _predicate(driver: WebDriverOrWebElement): return _predicate -def any_of(*expected_conditions: Callable[[D], T]) -> Callable[[D], Union[Literal[False], T]]: +def any_of(*expected_conditions: Callable[[D], Union[T, Literal[False]]]) -> Callable[[D], Union[Literal[False], T]]: """An expectation that any of multiple expected conditions is true. Equivalent to a logical 'OR'. Returns results of the first matching