Locate Elements
Use FinalRun's AI to verify the step before execution.
Last updated
Use FinalRun's AI to verify the step before execution.
Last updated
You can locate elements using two methods:
Simple Prompting
Attribute-Based Prompting
Describe elements as you see them visually on the app interface, such as text or images.
Example: If you observe a search field with a placeholder text 'Search items', you can simply write a prompt like 'Search items'.
If Simple Prompting does not accurately locate the element, proceed with Attribute-Based Prompting.
Steps to Locate Elements:
Hover to Inspect:
Hover over the device's live stream on the left side of the FinalRun Test Case Editor.
Observe the attributes of each element. Use these attributes to refine your prompt for precise identification.
Write a Prompt:
Use a concise and descriptive prompt like "search field".
Click the Locate icon to identify the element. (Refer to the image below.)
Platform-Specific Tips:
Android:
Use attributes like <id>
to uniquely identify elements. For instance, if the <id>
is org.wikipedia:id/search_container
, use the term search_container
in your prompt instead of the entire <id>
.
iOS:
Leverage attributes like <elementType>
, <label>
for precise identification of UI elements.
If elementType
is not unique or not significant, use combination of both elementType
and label
to describe in the prompt like "elementType 'button' with label 'Settings'"