Skip to content

Commit c3fac60

Browse files
committed
ci: debug login button
1 parent 19c9330 commit c3fac60

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

sample/Tests/test/test_windows.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,32 @@ def login(self):
7272
def _perform_login(self):
7373
"""Perform normal login flow when app is in UnauthenticatedScene"""
7474
try:
75+
# Debug: Check what scene we're actually in and what objects exist
76+
try:
77+
current_scene = self.get_altdriver().get_current_scene()
78+
print(f"DEBUG: _perform_login - current scene: {current_scene}")
79+
except Exception as e:
80+
print(f"DEBUG: Could not get current scene: {e}")
81+
82+
# Wait a moment for UI to stabilize and check if app is still running
83+
time.sleep(3)
84+
85+
# Debug: Check if we can still communicate with the app
86+
try:
87+
connection_test = self.get_altdriver().get_current_scene()
88+
print(f"DEBUG: App still responsive, scene: {connection_test}")
89+
except Exception as e:
90+
print(f"DEBUG: App may have crashed or lost connection: {e}")
91+
raise SystemExit("App connection lost during login attempt")
92+
93+
# Debug: Try to find any buttons to see what's available
94+
try:
95+
all_objects = self.get_altdriver().get_all_elements()
96+
button_objects = [obj for obj in all_objects if 'btn' in obj.name.lower() or 'button' in obj.name.lower()]
97+
print(f"DEBUG: Found button-like objects: {[obj.name for obj in button_objects]}")
98+
except Exception as e:
99+
print(f"DEBUG: Could not get all objects: {e}")
100+
75101
# Check for login button
76102
login_button = self.get_altdriver().find_object(By.NAME, "LoginBtn")
77103
print("Found login button - performing login")

0 commit comments

Comments
 (0)