A lazy, driver-independent element query.
Role locators accept these options:
:name(String.t/0) - Restrict the role locator by accessible name.:exact(boolean/0) - Require an exact, case-sensitive accessible-name match.
Text, label, placeholder, alternative-text, and title locators accept:
:exact(boolean/0) - Require an exact, case-sensitive match.
Test-id locators accept:
:attribute(String.t/0) - Attribute used as the test-id source. The default value is"data-testid".
filter/2 accepts:
:has(struct of typeFluffy.Locator) - Keep elements containing a match for this locator.:has_text(String.t/0) - Keep elements containing this normalized text.:has_not(struct of typeFluffy.Locator) - Keep elements containing no match for this locator.:has_not_text(String.t/0) - Keep elements that do not contain this normalized text.
Summary
Types
Functions
@spec by_alt_text(String.t(), [exact_option()]) :: t()
@spec by_alt_text(t(), String.t(), [exact_option()]) :: t()
@spec by_label(String.t(), [exact_option()]) :: t()
@spec by_label(t(), String.t(), [exact_option()]) :: t()
@spec by_placeholder(String.t(), [exact_option()]) :: t()
@spec by_placeholder(t(), String.t(), [exact_option()]) :: t()
@spec by_role(t(), atom(), [role_option()]) :: t()
@spec by_test_id(String.t(), [test_id_option()]) :: t()
@spec by_test_id(t(), String.t(), [test_id_option()]) :: t()
@spec by_text(String.t(), [exact_option()]) :: t()
@spec by_text(t(), String.t(), [exact_option()]) :: t()
@spec by_title(String.t(), [exact_option()]) :: t()
@spec by_title(t(), String.t(), [exact_option()]) :: t()
@spec filter(t(), [filter_option()]) :: t()