Retrieving text below (location relative to) a specific text


Hi! I’m having problem with creating this test. From the mobile application in this picture, I’m trying to retrieve the numeric value under “APPL” to do further testing. The challenge is that “APPL” might change its location to be in the middle or the bottom of this list, so after finding the word “APPL”, I don’t know how to retrieve the number under it. How should I approach this?

Hi @SupawisT,
You can try and find the ‘APPL’ element with these Xpaths:

//*[text() = 'APPL']
//*[contains(text(),"APPL")]

You can then check if the value is found under this Xpath as a child element which will help you build a precise Xpath that will find that number.

If you are still not able to solve it, please contact our support mail at support@testproject.io

This topic was automatically closed after 180 days. New replies are no longer allowed.