I have a case where want to compare some data (in a csv) file to some values on my AUT. The AUT has the values I want to compare to in individual objects on the screen (hyperlinks). The objects containing the values are identical, except they have different text and id values. So I have stripped down my object to find it only by class. When I verify and highlight, it finds the object 2 times, which is great.
What I want to do it to loop through each object (containing the text I want to verify) and compare against my .csv file. And I’d like to keep this code as a custom keyword to later compare in other places, where the number of objects I am comparing may be more, or fewer.
So I need a way to dynamically get the id or text of EACH of the target objects on screen, using the single object. So far, I have only been able to get the id or text of the first object of the 2 it finds.
So far, I have created a loop to get the text of the objects on the screen and compare to my .csv. The findTesObject method finds 2 objects. Great. But it only gets the text of the first object. The loop does not continue and findText again on the second.