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

Method accept_alert

seleniumbase/fixtures/base_case.py:11395–11409  ·  view source on GitHub ↗

Same as wait_for_and_accept_alert(), but smaller default T_O

(self, timeout=None)

Source from the content-addressed store, hash-verified

11393 ############
11394
11395 def accept_alert(self, timeout=None):
11396 """Same as wait_for_and_accept_alert(), but smaller default T_O"""
11397 self.__check_scope()
11398 if not timeout:
11399 timeout = settings.SMALL_TIMEOUT
11400 if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
11401 timeout = self.__get_new_timeout(timeout)
11402 alert = page_actions.wait_for_and_accept_alert(self.driver, timeout)
11403 if self.recorder_mode and self.__current_url_is_recordable():
11404 if self.get_session_storage_item("pause_recorder") == "no":
11405 time_stamp = self.execute_script("return Date.now();")
11406 origin = self.get_origin()
11407 action = ["acc_a", "", origin, time_stamp]
11408 self.__extra_actions.append(action)
11409 return alert
11410
11411 def dismiss_alert(self, timeout=None):
11412 """Same as wait_for_and_dismiss_alert(), but smaller default T_O"""

Callers 13

accept_alertFunction · 0.80
accepter_alerteMethod · 0.80
accetta_avvisoMethod · 0.80
aceptar_alertaMethod · 0.80
경고를_수락Method · 0.80
接受警报Method · 0.80
aceitar_alertaMethod · 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 3

test_alertsMethod · 0.64
test_alertsMethod · 0.64