click
Executes a physical tap or click on the UI element matching the provided string tag or text.
This is the primary and simplest method for interacting with UI elements. It automatically attempts to match by explicit Compose testTag first, and falls back to matching by visible text substring.
Automatically waits for the element to become visible before attempting the click.
Example Usage
click("Submit")
click("login_button")Parameters
The testTag string or visible text of the UI element to click.
See also
Throws
If no visible element matching tag appears within the timeout.
Executes a physical tap or click on the UI element matching the specified selector.
Use this variant when precise element targeting is required—such as matching an exact tag only (tag()), exact text only (text()), or picking a specific index when multiple elements match (atIndex(), first(), last()).
Automatically waits for the element to become visible before attempting the click.
Example Usage
// Click strictly by testTag (ignores text matching)
click(tag("submit_btn"))
// Click strictly by visible text substring
click(text("Sign In"))
// Click the 2nd matching element when multiple items exist
click(auto("Delete").atIndex(1))Parameters
The explicit Selector rule used to locate the target UI element.
See also
Throws
If no visible node matches selector within the timeout.