Skip to content

Either path or source parameter must be specified #534

Closed
@YusukeIwaki

Description

@YusukeIwaki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions