Spaces:
Running
Running
| 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() | |