File size: 1,874 Bytes
9b48778
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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()