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
Functions
Converts an iframe element query to a lazy query of its content frame.
Creates a lazy frame scope. Frame traversal requires the Playwright driver.
Creates a nested frame scope relative to an element or frame query.
Types
@type exact_option() :: {:exact, boolean()}
@type scope() :: t() | Fluffy.FrameLocator.t()
@type t() :: %Fluffy.Locator{operations: [term()]}
@type test_id_option() :: {:attribute, binary()}
Functions
@spec by_alt_text(scope(), String.t(), [exact_option()]) :: t()
@spec by_label(scope(), String.t(), [exact_option()]) :: t()
@spec by_placeholder(scope(), String.t(), [exact_option()]) :: t()
@spec by_role(scope(), atom(), [role_option()]) :: t()
@spec by_test_id(scope(), String.t(), [test_id_option()]) :: t()
@spec by_text(scope(), String.t(), [exact_option()]) :: t()
@spec by_title(scope(), String.t(), [exact_option()]) :: t()
@spec content_frame(t()) :: Fluffy.FrameLocator.t()
Converts an iframe element query to a lazy query of its content frame.
@spec filter(t(), [filter_option()]) :: t()
@spec frame_locator(String.t()) :: Fluffy.FrameLocator.t()
Creates a lazy frame scope. Frame traversal requires the Playwright driver.
@spec frame_locator(scope(), String.t()) :: Fluffy.FrameLocator.t()
Creates a nested frame scope relative to an element or frame query.