UserSyncInterface / debug_black_screen.py
AUXteam's picture
Upload folder using huggingface_hub
e6db76d verified
raw
history blame contribute delete
989 Bytes
from playwright.sync_api import sync_playwright
import time
def verify():
with sync_playwright() as p:
browser = p.chromium.launch(headless=True)
context = browser.new_context(viewport={'width': 1280, 'height': 720})
page = context.new_page()
page.on('console', lambda msg: print(f'BROWSER LOG: {msg.text}'))
page.on('pageerror', lambda err: print(f'BROWSER ERROR: {err}'))
print("Navigating to HF Space...")
page.goto('https://auxteam-usersyncinterface.hf.space')
print("Wait 1s")
time.sleep(1)
page.screenshot(path='/home/jules/verification/black_1s.png')
print("Wait 3s")
time.sleep(3)
page.screenshot(path='/home/jules/verification/black_4s.png')
print("Wait 5s")
time.sleep(5)
page.screenshot(path='/home/jules/verification/black_9s.png')
browser.close()
if __name__ == "__main__":
verify()