-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_script.py
More file actions
29 lines (22 loc) · 824 Bytes
/
Copy pathtest_script.py
File metadata and controls
29 lines (22 loc) · 824 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
26
27
28
29
from playwright.sync_api import sync_playwright
import time
def verify():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
page.goto("http://localhost:8080/index.html")
time.sleep(2)
# Click Suspended Sediment card
page.locator("#card-card_sediment").click()
time.sleep(1)
# Click the state button
page.locator("#card-sediment_btn_state").click()
time.sleep(1)
# Wait for the popup and the iframe to load
page.wait_for_selector("#sivo-full-page-overlay")
time.sleep(2)
page.screenshot(path="verification_after_click.png")
print("Screenshot saved to verification_after_click.png")
browser.close()
if __name__ == "__main__":
verify()