Skip to content

[Feature] rename TimeoutError or make it extend the builtin TimeoutError #1495

Description

@DetachHead

TimeoutError shadows a builtin exception with the same name, which leads to confusion

try:
    page.click("foo")
except TimeoutError: # builtins.TimeoutError
    # this doesn't run because it raises a playwright.sync_api.TimeoutError
    print("failed to click element")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions