import time
from playwright.sync_api import sync_playwright

print('start', flush=True)
with sync_playwright() as p:
    b = p.chromium.launch(args=["--force-color-profile=srgb",
                                "--font-render-hinting=none",
                                "--disable-lcd-text"])
    print('launched', flush=True)
    pg = b.new_page(viewport={"width": 1536, "height": 864})
    print('page', flush=True)
    t = time.time()
    pg.goto("file:///home/ubuntu/standalone/builds/23-tate-2/src/index.html", timeout=20000)
    print('goto', time.time() - t, flush=True)
    pg.wait_for_timeout(1000)
    print('shot...', flush=True)
    pg.screenshot(path="work/t.png")
    print('done', flush=True)
    b.close()
