Query reference¶
Queries read state rather than mutating the page. Most run against a Locator;
url and title run against the Page.
url (Page)¶
The current page URL.
1 | |
title (Page)¶
The document title.
1 | |
text-content¶
The element's textContent.
1 | |
inner-text¶
The rendered innerText, reflecting visibility and CSS.
1 | |
get-attribute¶
The value of a named attribute, or the type object when absent.
1 | |
input-value¶
The current value of an input, textarea, or select.
1 | |
count¶
The number of elements the locator matches.
1 | |
is-visible, is-enabled, is-checked¶
Boolean state checks.
1 2 3 | |
wait-for¶
Waits until the element reaches a state: attached, detached, visible, or
hidden.
1 | |
Chaining¶
locator chains from a page or another locator, scoping the selector to the
parent.
1 | |