Skip to content

Commit c5b2fd7

Browse files
committed
test: no switching tabs
1 parent 468a8f5 commit c5b2fd7

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/ui-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
pip install -r "sample/Tests/requirements-desktop.txt"
9696
else
9797
pip install -r "sample/Tests/requirements-mobile.txt"
98-
fi
98+
fi
9999
- name: Run UI tests
100100
env:
101101
UNITY_APP_PATH: SampleApp.app

sample/Tests/test/test_mac_2.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def test_case(self):
7575

7676
print("Open a window on Chrome")
7777
seleniumdriver.current_window_handle
78+
print("Current window handles:", seleniumdriver.window_handles)
7879

7980
time.sleep(5)
8081

@@ -85,13 +86,14 @@ def test_case(self):
8586
time.sleep(2)
8687

8788
print("Waiting for new window...")
88-
WebDriverWait(seleniumdriver, 30).until(EC.number_of_windows_to_be(2))
89+
time.sleep(5)
90+
# WebDriverWait(seleniumdriver, 30).until(EC.number_of_windows_to_be(2))
8991

90-
# Switch to the new window
91-
all_windows = seleniumdriver.window_handles
92-
new_window = [window for window in all_windows if window != seleniumdriver.current_window_handle][0]
93-
seleniumdriver.switch_to.window(new_window)
94-
print("Switched to new window")
92+
# # Switch to the new window
93+
# all_windows = seleniumdriver.window_handles
94+
# new_window = [window for window in all_windows if window != seleniumdriver.current_window_handle][0]
95+
# seleniumdriver.switch_to.window(new_window)
96+
# print("Switched to new window")
9597

9698
# Wait for confirmation screen
9799
continue_btn = WebDriverWait(seleniumdriver, 60).until(EC.presence_of_element_located((SeleniumBy.CLASS_NAME, 'Button--primary')))

0 commit comments

Comments
 (0)