Spaces:
Running
Running
File size: 989 Bytes
e6db76d |
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 |
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()
|