Skip to content

Commit f41a3ab

Browse files
committed
Improve Safari reliability on the self.open_new_window() method
1 parent e23bcc4 commit f41a3ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,6 +1865,9 @@ def open_new_window(self, switch_to=True):
18651865
time.sleep(0.01)
18661866
if switch_to:
18671867
self.switch_to_window(len(self.driver.window_handles) - 1)
1868+
time.sleep(0.01)
1869+
if self.browser == "safari":
1870+
self.wait_for_ready_state_complete()
18681871

18691872
def switch_to_window(self, window, timeout=None):
18701873
self.__check_scope()

0 commit comments

Comments
 (0)