Closed
Description
I found a little confusing error message.
from playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
browser = playwright.chromium.launch()
try:
page = browser.new_page()
page.add_init_script()
finally:
browser.close()
This code throws an error Either path or source parameter must be specified
However page.add_init_script doesn't have source
parameter.
IMHO, Either path or script parameter must be specified
would be better.