Spaces:
Running
Running
File size: 1,402 Bytes
7934a47 |
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 30 31 32 33 34 35 36 37 |
from playwright.sync_api import sync_playwright
import os
def run():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
page = browser.new_page()
url = "https://auxteam-usersyncinterface.hf.space"
print(f"Navigating to {url}...")
try:
page.goto(url, timeout=90000)
page.wait_for_selector('text=Branding Content Testing', timeout=60000)
# Scroll to bottom to ensure info box is visible
page.evaluate("document.querySelector('aside').scrollTop = document.querySelector('aside').scrollHeight")
page.wait_for_timeout(1000)
os.makedirs("/home/jules/verification", exist_ok=True)
page.screenshot(path="/home/jules/verification/final_landing.png", full_page=True)
print("Clicking Open Global Chat...")
page.click('text=Open Global Chat')
page.wait_for_selector('text=New Simulation', timeout=20000)
page.screenshot(path="/home/jules/verification/final_chat.png", full_page=True)
print("Verification successful.")
except Exception as e:
print(f"Error: {e}")
page.screenshot(path="/home/jules/verification/final_error.png")
browser.close()
if __name__ == "__main__":
run()
|