storeText only stores the first match?

I think that is by design. Can you add an index like ${i} to your locator and then loop over all matches?

Example: //*[@id=“country-list”]/li[ ${!loop} ]/a/img

This example is from here: QUERY: Can a RPA macro capture website info (table scraping)? - #2 by TechSupport

If your locators would be as follows:

//*[@id="country-list"]/li[1]/a/img (first match)
//*[@id="country-list"]/li[2]/a/img (2nd match)
//*[@id="country-list"]/li[3]/a/img (3rd match)

=> so we replace the 1,2,3… with the !loop variable:

//*[@id=“country-list”]/li[ ${!loop} ]/a/img

1 Like