For the complete documentation index, see llms.txt. This page is also available as Markdown.

Has element

Check whether an element exists on the screen or not, returning the result to a variable.

Has element is the action of checking whether an element (by XPath) exists on the current screen, then returning the true/false result to a variable to branch the script.

🎥 Watch the tutorial video: Here.

Explanation of configuration parameters:

  • XPath: The XPath of the element to check, for example //node[@resource-id="com.android.chrome:id/url_bar"]. See how to get XPath in Guide to Determine XPath & Coordinates.

  • Output Variable Name: The name of the variable to store the result true/false (true if the element exists). Use this variable in the If block to branch.

Last updated

Was this helpful?