Actionability
Playwright waits until all the relevant actionability checks pass before performing an action. This means that action will fail with if checks do not pass within the specified timeout
.
Some actions like page.click()
support {force: true}
option that disable non-essential actionability checks, for example passing force
to click()
method will not check that the target element actually receives click events.
Stable
Element is considered stable when it has maintained the same bounding box for at least two consecutive animation frames.
Element is considered enabled when it is not a <button>
, <select>
or <input>
with a disabled
property set.
Editable
Element is considered receiving pointer events when it is the hit target of the pointer event at the action point. For example, when clicking at the point (10;10)
, Playwright checks whether some other element (usually an overlay) will instead capture the click at (10;10)
.
Attached
Element is considered attached when it is to a Document or a ShadowRoot.
- For selector-based actions, Playwright first waits for an element matching
selector
to be attached to the DOM, and then checks that element is still attached before performing the action. If element was detached, the action is retried from the start. - For handle-based actions, Playwright throws if the element is not attached.
For example, consider a scenario where Playwright will click Sign Up
button regardless of when the page.click()
call was made:
- after checking with the server, the disabled
Sign Up
button is replaced with another one that is now enabled.