LocatorFilterOptions Class

Configures Locator.Filter: the conditions that the elements of a locator must satisfy.

public sealed class LocatorFilterOptions

Constructors

NameDescription
LocatorFilterOptions()

LocatorFilterOptions()

public LocatorFilterOptions()

No documentation is available.

Properties

NameDescription
HasGets a locator that finds at least one element inside the elements, evaluated from each element (page.GetByRole("listitem").Filter(new() { Has = page.GetByRole("button", "Delete") })).
HasNotGets a locator that finds no element inside the elements, evaluated from each element.
HasNotTextGets a text that the elements do not contain (a substring, ignoring the case and collapsing the white space).
HasNotTextRegexGets a regular expression that does not match the text of the elements.
HasTextGets a text that the elements contain, somewhere in their descendants (a substring, ignoring the case and collapsing the white space).
HasTextRegexGets a regular expression that matches the text of the elements.
VisibleGets whether the elements are visible, or null to keep the visible and the hidden elements.

Gets a locator that finds at least one element inside the elements, evaluated from each element (page.GetByRole("listitem").Filter(new() { Has = page.GetByRole("button", "Delete") })).

public Locator? Has { get; init; }

Property value

Locator?

Gets a locator that finds no element inside the elements, evaluated from each element.

public Locator? HasNot { get; init; }

Property value

Locator?

Gets a text that the elements do not contain (a substring, ignoring the case and collapsing the white space).

public string? HasNotText { get; init; }

Property value

string?

Gets a regular expression that does not match the text of the elements.

public Regex? HasNotTextRegex { get; init; }

Property value

Regex?

Gets a text that the elements contain, somewhere in their descendants (a substring, ignoring the case and collapsing the white space).

public string? HasText { get; init; }

Property value

string?

Gets a regular expression that matches the text of the elements.

public Regex? HasTextRegex { get; init; }

Property value

Regex?

Gets whether the elements are visible, or null to keep the visible and the hidden elements.

public bool? Visible { get; init; }

Property value

bool?