Get Column Number by Text
Last updated
Was this helpful?
Last updated
Was this helpful?
This is pre-built Action located under the Table captured from the AUT Element Name. It instructs the Avo Assure Client to retrieve the column number of the specified text present in the table which is specified in the Input value while making test steps in Avo Assure and save the result in the given output variable.
It allows testers to avoid using hardcoded column indices and instead find the correct column based on its header text.
Input: <text>
Output: <Dynamic Variable>;<Dynamic Variable>(Optional)
In an HRMS application, there is an "Employee Directory" page where employee information is displayed in a table. The table contains multiple columns such as "Employee ID", "Name", "Department", "Job Title", and "Salary". The order of the columns may change dynamically based on the user's preferences, so instead of using a hardcoded column index, the test needs to dynamically identify the column index based on the column header text (e.g., "Salary"). This can be automated using the "Get Column Number by Text" Action.
The test needs to find the column index of the "Salary" column, regardless of its position, in order to verify the salary details of a specific employee.
Salary
The test need to dynamically retrieve the column index of the "Salary" column by its header text and save it in the {result} Output Variable.
The resulting extracted number is stored in the {result} output variable as 5, which can be utilized for display or other purposes.