Queries a Node for a list of states.
{Node} The node to query, which will be transformed into the nearest element to query the state.
{ElementState[]} The states to query.
A Promise that resolves to an object with the status of the query.
Queries a Node for a single state.
{Node} The node to query, which will be transformed into the nearest element to query the state.
{ElementStateWithoutStable} The state to query.
A Promise that resolves to an object with the status of the query.
Checks if an element is ready for an interaction.
{Element} The element to check.
{ElementInteractionType} The type of interaction to check.
OptionalhitPointOffset: { x: number; y: number }
{?{x: number, y: number}} The offset of the hit point from the center of the element.
A Promise that resolves to an object with the status of the check.
Waits for an element to be ready for an interaction.
{Element} The element to wait for.
{ElementInteractionType} The type of interaction to wait for.
{number} The timeout in milliseconds.
OptionalhitPointOffset: { x: number; y: number }
{?{x: number, y: number}} The offset of the hit point from the center of the element.
A Promise that resolves to the hit point of the interaction.
Gets the bounding rectangle of an element in the view port.
{Element}The element to get the bounding rectangle of.
A Promise that resolves to the bounding rectangle of the element in the view port, or undefined if the element is not in the view port.
Checks if an element is in the view port.
{Element}The element to check.
A Promise that resolves to a boolean indicating if the element is in the view port.
Checks if an element is visible.
The element to check.
A boolean indicating if the element is visible.
Checks, for each of several elements, whether its rendered text contains a string. Text is compared ignoring case, with each run of whitespace treated as one space and whitespace at either end ignored.
The elements to check.
The text to look for; empty text is contained in every element.
For each element, in order, whether its text contains the string.
Finds the open shadow roots within some scopes, including nested ones, so that a search can include them.
The documents, elements, or shadow roots to search.
The open shadow roots, each once, in the order found.
Checks, for each of several elements, whether it has every given ARIA state. A state that does not apply to an element, such as checked for a link, does not match.
The elements to check.
The states each element must have; an omitted state is not checked.
For each element, in order, whether it has every given state.
Finds the elements within some scopes whose labels match a text. An element's labels are the elements its aria-labelledby attribute refers to; failing that, its aria-label attribute; failing that, the label elements of a form control. Labels are compared as elementsContainText compares text; with exact, the whole label must match, with case.
The documents or elements to search within, not including the elements themselves.
The text to match.
Whether the whole label must match, with case.
The matching elements, in the order found, each once.
Checks if an element is disabled.
The element to check.
A boolean indicating if the element is disabled.
Checks if an element is read only.
The element to check.
A boolean indicating if the element is read only, or 'error' if the element is not an ,
Checks if an element is scrollable into view.
The element to check.
A boolean indicating if the element is scrollable into view.
Gets a click point of an element.
The element to get the click point of.
Optionaloffset: { x: number; y: number }
The offset of the click point from the center of the element.
A Promise that resolves to an object with information about the click point.
Gets the texts of an element's labels, as findElementsByLabel matches them: the elements it is labelled by, its aria-label, or its label elements.
The element.
The texts, or an empty list if the element is not labelled.
Inspector for element states and interactions.