ScreenQuery

Query methods for finding elements in the rendered output.

Implementers

Properties

container → DomNode
The container element.
no setter

hashCode → int

The hash code for this object.
no setterinherited

runtimeType → Type

A representation of the runtime type of the object.
no setterinherited

Methods

findByRole(String role, {String? name, Duration timeout = const Duration(seconds: 1)}) → Future<DomNode>
Waits for element with role to appear.

findByTestId(String testId, {Duration timeout = const Duration(seconds: 1)}) → Future<DomNode>

Waits for element with test ID to appear.

findByText(String text, {bool exact = true, Duration timeout = const Duration(seconds: 1)}) → Future<DomNode>

Waits for element with text to appear.

getByAltText(String altText, {bool exact = true}) → DomNode

Finds element by its alt text (for images).

getByDisplayValue(String value, {bool exact = true}) → DomNode

Finds element by its display value (for inputs).

getByLabelText(String labelText, {bool exact = true}) → DomNode

Finds element by its label text (for form inputs).

getByPlaceholderText(String placeholder, {bool exact = true}) → DomNode

Finds element by its placeholder text.

getByRole(String role, {String? name}) → DomNode

Finds element by its ARIA role.

getByTestId(String testId) → DomNode

Finds element by test ID attribute (data-testid).

getByText(String text, {bool exact = true}) → DomNode

Finds element by its text content.

getByTitle(String title, {bool exact = true}) → DomNode

Finds element by its title attribute.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a nonexistent method or property is accessed.
inherited

queryAllByAltText(String altText, {bool exact = true}) → List<DomNode>

Finds all images with the given alt text.

queryAllByDisplayValue(String value, {bool exact = true}) → List<DomNode>

Finds all input elements with the given display value.

queryAllByLabelText(String labelText, {bool exact = true}) → List<DomNode>

Finds all elements associated with labels containing the text.

queryAllByPlaceholderText(String placeholder, {bool exact = true}) → List<DomNode>

Finds all elements with the given placeholder.

queryAllByRole(String role, {String? name}) → List<DomNode>

Finds all elements with the given ARIA role.

queryAllByTestId(String testId) → List<DomNode>

Finds all elements with the given test ID.

queryAllByText(String text, {bool exact = true}) → List<DomNode>

Finds all elements containing the given text.

queryAllByTitle(String title, {bool exact = true}) → List<DomNode>

Finds all elements with the given title attribute.

queryByPlaceholderText(String placeholder, {bool exact = true}) → DomNode?

Queries for element by placeholder. Returns null if not found.

queryByRole(String role, {String? name}) → DomNode?

Queries for element by role. Returns null if not found.

queryByTestId(String testId) → DomNode?

Queries for element by test ID. Returns null if not found.

queryByText(String text, {bool exact = true}) → DomNode?

Queries for element by text. Returns null if not found.

toString() → String

A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited