@@ -56,40 +56,15 @@ def login():
56
56
57
57
# Get all window handles
58
58
all_windows = driver .window_handles
59
- < << << << HEAD
60
-
61
- print (f"Found { len (all_windows )} new windows to check: { all_windows } " )
62
-
63
- # Find the window with the expected element
64
- == == == =
65
59
66
60
print (f"Found { len (all_windows )} new windows to check: { all_windows } " )
67
61
68
62
# Find the window with email input
69
- >> >> >> > 8 cb65d08 (test : fix windows login tab )
70
63
target_window = None
71
64
for window in all_windows :
72
65
try :
73
66
print (f"Checking window: { window } " )
74
67
driver .switch_to .window (window )
75
- << << << < HEAD
76
-
77
- if use_pkce :
78
- driver .find_element (By .ID , ':r1:' )
79
- target_window = window
80
- print (f"Found email input in window: { window } " )
81
- else :
82
- driver .find_element (By .XPATH , "//button[span[text()='Continue']]" )
83
- target_window = window
84
- print (f"Found continue button in window: { window } " )
85
-
86
- break
87
- except :
88
- expected_element = "Email input" if use_pkce else "Continue button"
89
- print (f"{ expected_element } not found in window: { window } , trying next..." )
90
- continue
91
-
92
- == == == =
93
68
driver .find_element (By .ID , ':r1:' )
94
69
target_window = window
95
70
print (f"Found email input in window: { window } " )
@@ -98,16 +73,11 @@ def login():
98
73
print (f"Email input not found in window: { window } , trying next..." )
99
74
continue
100
75
101
- >> >> >> > 8 cb65d08 (test : fix windows login tab )
102
76
if not target_window :
103
77
print ("Could not find email input field in any window!" )
104
78
driver .quit ()
105
79
return
106
- < << << << HEAD
107
-
108
- == == == =
109
80
110
- >> >> >> > 8 cb65d08 (test : fix windows login tab )
111
81
print ("Switch to the target window" )
112
82
driver .switch_to .window (target_window )
113
83
0 commit comments