Target Elements With Text Value

Target Elements with text value

This custom command will allow you to target and interact with an element based on its text content. A dropdown option will allow you specify if you are looking for the text value in the innerText (visible text) or any other attribute such as href or src… And if there are more than 1 element containing that text value in that given attribute in the source code, you have the option to select if you want to interact with all the occurrences (Multiple) or you can select one specific occurrence (Single) by specifying it’s position: 1 for the 1st occurrence etc…
This essentially allows you to target one specific element, or a series of element based on their specific text content and then feed the results to List to create a loop of actions on those elements.

You also have the possibility to specify if you want case-sensitivity or not and if you want partial of exact match for the target text you have chosen.

Last but not least you can specify a “negative keyword” that you do not want to be present in the target element attribute.
How to configure and use this Custom Command :
1) Specify action : Read or Click.

2) Text you target.

3) Specify position of occurrence or leave empty to catch all.
4) Target inner text value or a specific attribute.

4.1) Specify attribute if chose Custom.

5) Return one value or a specific position if configured or all if position field is empty.

6) Your case-sensitiveness requirement.

7) Target exact or partial match.
Watch Video Demo (Coming soon…) :
If you find our template useful and like it, please give us a favor by sharing this template to your community for wide circulation. Thanks