Skip to content

Commit 39c3642

Browse files
committed
test: windows ui test when resetting app
1 parent d70788e commit 39c3642

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sample/Tests/test/test_windows.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ def test_1_device_code_login(self):
5151
if attempt == 0:
5252
# Reset app
5353

54-
# Relogin
54+
# Relogin (optional: only if the button is present)
5555
print("Try reset the app and log out once...")
56-
self.altdriver.wait_for_object(By.NAME, "ReloginBtn").tap()
56+
try:
57+
self.altdriver.wait_for_object(By.NAME, "ReloginBtn").tap()
58+
except Exception as e:
59+
print("ReloginBtn not found, skipping relogin step. User may already be in AuthenticatedScene.")
5760

5861
# Wait for authenticated screen
5962
self.altdriver.wait_for_current_scene_to_be("AuthenticatedScene")

0 commit comments

Comments
 (0)