Simple code I wrote:
from playwright.sync_api import sync_playwright
print('debug1')
p = sync_playwright().start()
print('debug2')
browser = p.firefox.launch(headless=False)
print('debug3')
page = browser.new_page()
page.goto("http://whatsmyuseragent.org/")
page.screenshot(path="example.png")
browser.close()
And the output I get:
debug1
I am a complete noob in using playwright library, and the program just hangs on the 'sync_playwright().start()' part. I've tried running other example scripts from the internet, and all of them froze on this line. Also I've tried changing browsers and using headless mode, all of them didn't work.