Set Focus on Object
This is pre-built Action located under the @Custom Element Name. It instructs the Avo Assure Client to set the focus on the element/object specified in the input.
Syntax
Input: <Object Type>;<VisibleText(Optional)>;<index>; <abs(optional)>
For above syntax user needs to give specific Object type, visible text of the object (optional) along with element index of the object and abs.
Output: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Usecase/Example

Scenario
A user is testing a login form where they need to verify that the input field for the username receives focus when the page loads. The Avo Assure will use the "Set Focus on Object" Action to set the focus on the username field.
The automation script is written to check that when the user navigates to the login page, the username input field automatically gets focused for a smooth user experience.
Input
textbox;;1
Expected Result
When the page loads, the focus should be set on the username input field. The cursor should appear inside the username field, allowing the user to immediately begin typing.
Output
The Set Focus on Object Action is setting the focus on the textbox.
Last updated
Was this helpful?