Same as wait_for_and_dismiss_alert(), but smaller default T_O
(self, timeout=None)
| 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""" |