Skip to main content
Locator state checks methods for the Playwright driver.

isVisible

Returns whether the element is visible.
Does not wait for element to appear. For assertions, prefer expect(locator).toBeVisible().
Upstream docs
options
{ timeout?: number }
result
boolean
Return value
await locator.isVisible();

isHidden

Returns whether the element is hidden.
Opposite of isVisible(). For assertions, prefer expect(locator).toBeHidden().
Upstream docs
options
{ timeout?: number }
result
boolean
Return value
await locator.isHidden();

isEnabled

Returns whether the element is enabled.
For assertions, prefer expect(locator).toBeEnabled().
Upstream docs
options
{ timeout?: number }
result
boolean
Return value
await locator.isEnabled();

isDisabled

Returns whether the element is disabled.
For assertions, prefer expect(locator).toBeDisabled().
Upstream docs
options
{ timeout?: number }
result
boolean
Return value
await locator.isDisabled();

isChecked

Returns whether a checkbox or radio is checked.
For assertions, prefer expect(locator).toBeChecked().
Upstream docs
options
{ timeout?: number }
result
boolean
Return value
await locator.isChecked();

isEditable

Returns whether the element is editable.
For assertions, prefer expect(locator).toBeEditable().
Upstream docs
options
{ timeout?: number }
result
boolean
Return value
await locator.isEditable();