Get Text of Element
Last updated
Was this helpful?
Last updated
Was this helpful?
This is pre-built Action located under the @Custom Element Name. It instructs the Avo Assure Client to get the text of the element and save the result in the given output variable.
Input: <Object Type>;<VisibleText(Optional)>;<index>; <abs(optional)>
For above syntax user needs to gives specific Object type, visible text of the object (optional) along with element index of the object and abs.
Note: if for last argument abs is defined then the Action must be executed with absolute preformation with the specified visible text in the input.
Output: <Dynamic Variable>;<Dynamic Variable>(Optional)
A user is testing a login page where the error message should appear if the user enters incorrect credentials. The Avo Assure will verify if the correct error message is displayed when invalid login information is provided.
The Get Text of Element Action will fetch the text which user can check that the correct error message is displayed when an invalid username and password are entered.
This scenario demonstrates how the "Get Text of Element" Action is used in automation testing to extract the text from an element (such as an error message).
textbox;;1
The “Get Text of Element” Action needs to retrieve the extracted text of the element and save it in the Output Variable.
The Get Text of Element Action is extracting the text and saving it in the {result} Output Variable as Invalid username or password., which can be utilized for display or other purposes.