-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_ui.py
More file actions
25 lines (20 loc) · 853 Bytes
/
verify_ui.py
File metadata and controls
25 lines (20 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from playwright.sync_api import sync_playwright
def verify_xasm1_ui():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True, args=['--enable-unsafe-webgpu'])
page = browser.new_page()
# Navigate to local server
page.goto("http://localhost:5173")
# Log content if timeout
try:
page.wait_for_selector("text=libopenmpt Note Viewer", timeout=5000)
page.screenshot(path="verification_ui.png", full_page=True)
print("Screenshot taken: verification_ui.png")
except Exception as e:
print("Failed to find selector. Dumping page content:")
print(page.content())
page.screenshot(path="error_ui.png", full_page=True)
raise e
browser.close()
if __name__ == "__main__":
verify_xasm1_ui()