MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / dismiss_alert

Method dismiss_alert

seleniumbase/fixtures/base_case.py:11411–11425  ·  view source on GitHub ↗

Same as wait_for_and_dismiss_alert(), but smaller default T_O

(self, timeout=None)

Source from the content-addressed store, hash-verified

11409 return alert
11410
11411 def dismiss_alert(self, timeout=None):
11412 """Same as wait_for_and_dismiss_alert(), but smaller default T_O"""
11413 self.__check_scope()
11414 if not timeout:
11415 timeout = settings.SMALL_TIMEOUT
11416 if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
11417 timeout = self.__get_new_timeout(timeout)
11418 alert = page_actions.wait_for_and_dismiss_alert(self.driver, timeout)
11419 if self.recorder_mode and self.__current_url_is_recordable():
11420 if self.get_session_storage_item("pause_recorder") == "no":
11421 time_stamp = self.execute_script("return Date.now();")
11422 origin = self.get_origin()
11423 action = ["dis_a", "", origin, time_stamp]
11424 self.__extra_actions.append(action)
11425 return alert
11426
11427 def switch_to_alert(self, timeout=None):
11428 """Same as wait_for_and_switch_to_alert(), but smaller default T_O"""

Callers 12

dismiss_alertFunction · 0.80
rejeter_alerteMethod · 0.80
elimina_avvisoMethod · 0.80
descartar_alertaMethod · 0.80
경고를_거부Method · 0.80
アラートを却下Method · 0.80
解除警报Method · 0.80
demitir_alertaMethod · 0.80
test_alertsMethod · 0.80
test_alertsMethod · 0.80

Calls 7

__check_scopeMethod · 0.95
__get_new_timeoutMethod · 0.95
execute_scriptMethod · 0.95
get_originMethod · 0.95

Tested by 2

test_alertsMethod · 0.64
test_alertsMethod · 0.64