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) # Wait for app to load page.wait_for_selector('text=Branding Content Testing', timeout=60000) print("Page loaded successfully.") # Take screenshot of landing os.makedirs("/home/jules/verification", exist_ok=True) page.screenshot(path="/home/jules/verification/hf_landing.png") # Check for Info Box if page.locator('text=Configuration Required').is_visible(): print("Info box visible.") else: print("Info box NOT visible.") # Click Open Global Chat print("Clicking Open Global Chat...") page.click('text=Open Global Chat') # Wait for Chat Page page.wait_for_timeout(2000) # give it some time page.screenshot(path="/home/jules/verification/hf_chat_attempt.png") if page.locator('text=New Simulation').is_visible(): print("Chat page visible.") else: print("Chat page NOT visible according to text search.") # Check for Send button if page.locator('text=Send').is_visible(): print("Send button visible.") except Exception as e: print(f"Error during verification: {e}") page.screenshot(path="/home/jules/verification/hf_error.png") browser.close() if __name__ == "__main__": run()