File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
tests/security_and_privacy Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change
1
+ from time import sleep
2
+
1
3
import pytest
2
4
from selenium .webdriver import Firefox
3
5
from selenium .webdriver .support .wait import WebDriverWait
@@ -25,8 +27,16 @@ def test_https_first_mode_in_private_browsing(driver: Firefox):
25
27
prefs .select_https_only_setting (prefs .HTTPS_ONLY_STATUS .HTTPS_ONLY_PRIVATE )
26
28
hamburger = PanelUi (driver )
27
29
hamburger .open_private_window ()
28
- nav = Navigation (driver )
29
- nav .switch_to_new_window ()
30
+
31
+ # nav = Navigation(driver)
32
+ # nav.switch_to_new_window()
33
+
34
+ # Using this instead of switch_to_new_window, suspect that may be unstable
35
+ # on Linux CI machines. (slow to actually fully load the new Window)
36
+ non_private_window = driver .current_window_handle
37
+ original_window_idx = driver .window_handles .index (non_private_window )
38
+ private_window = driver .window_handles [1 - original_window_idx ]
39
+ driver .switch_to .window (private_window )
30
40
driver .get (HTTP_SITE )
31
41
32
42
# Wait for the URL to be redirected to HTTPS
You can’t perform that action at this time.
0 commit comments