File tree Expand file tree Collapse file tree
py/selenium/webdriver/support Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -692,19 +692,16 @@ def _predicate(driver: WebDriver):
692692 return _predicate
693693
694694
695- def alert_is_present () -> Callable [[WebDriver ], Alert | bool ]:
695+ def alert_is_present () -> Callable [[WebDriver ], Alert | Literal [ False ] ]:
696696 """Check that an alert is present and switch to it.
697697
698698 Returns:
699- The Alert once it is located.
699+ The Alert once it is located, or False if no alert is present .
700700
701701 Example:
702702 from selenium.webdriver.support.ui import WebDriverWait
703703 from selenium.webdriver.support import expected_conditions as EC
704704 alert = WebDriverWait(driver, 10).until(EC.alert_is_present())
705-
706- Note:
707- If the alert is present it switches the given driver to it.
708705 """
709706
710707 def _predicate (driver : WebDriver ):
You can’t perform that action at this time.
0 commit comments