Improve Safari reliability on the self.open_new_window() method

This commit is contained in:
Michael Mintz 2021-03-17 22:35:45 -04:00
parent e23bcc476e
commit f41a3ab0bc
1 changed files with 3 additions and 0 deletions

View File

@ -1865,6 +1865,9 @@ class BaseCase(unittest.TestCase):
time.sleep(0.01) time.sleep(0.01)
if switch_to: if switch_to:
self.switch_to_window(len(self.driver.window_handles) - 1) self.switch_to_window(len(self.driver.window_handles) - 1)
time.sleep(0.01)
if self.browser == "safari":
self.wait_for_ready_state_complete()
def switch_to_window(self, window, timeout=None): def switch_to_window(self, window, timeout=None):
self.__check_scope() self.__check_scope()