I’m trying to get the text of a certain element, and despite it being at the same place “visually”, sometimes it’s: //*[@id="provider-mounter"]/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/table/tbody/tr/td
and other times it’s //*[@id="provider-mounter"]/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/table/tbody/tr/td/span
Other than having 2 functions with both xpaths, is there an easy way to determine which one has “values” (not blank) and record that text?
The problem I’m encountering with relative xpath (from what I understand) is that the value I want to get is a random number, so there’s no unique identifier other than its position, and sometimes it’s one xpath vs the other.
If you indicate the url of the page, I can use some tools to find a good xpath.
With the xpath axes you can also recognize dynamic elements next to each other.
It’s important to find a good xpath to build good automations
Hi, I’m not registered on superuser/stackoverflow.
In the chrome store there are many addons to detect xpath, I have tried about 30 different ones because each one detects different xpaths, some of which are very generic and do not change.