Skip to content

playwright codgen --ignore_https_errors generate .py file error #1766

@colinsarah

Description

@colinsarah

There is a bug with codegen , generate code browser.new_context kwargs is ignore_httpserrors which should be ignore_http_serrors. code as follow:

from playwright.sync_api import Playwright, sync_playwright, expect


def run(playwright: Playwright) -> None:
    browser = playwright.chromium.launch(headless=False)
    context = browser.new_context(ignore_httpserrors=True)
    page.close()

    # ---------------------
    context.close()
    browser.close()


with sync_playwright() as playwright:
    run(playwright)

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