Skip to content

[BUG] Playwright v 1.50.0 is_enabled() method calls is_editable() instead #35081

@fedor-unilog

Description

@fedor-unilog

Discovered in Playwright on Python v 1.50.0

This code:

if page.get_by_role("button", name="Update").is_eanbled():
     page.get_by_role("button", name="Update").click()

(see the Enabled property for reference)
causes an error:

E           playwright._impl._errors.Error: Locator.is_enabled: Error: Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]
E           Call log:
E             - waiting for get_by_role("button", name="Update")

which perfectly corresponds to an error that the is_editable() method would throw being called on a button.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions