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[2]/div[2]/div/div[1]/div/div[2]/div/div[2]/div/div/div/div/div[2]/div/div[4]/div/div/div/div/div[2]/div/table/tbody[1]/tr/td[6]
and other times it’s //*[@id="provider-mounter"]/div/div[2]/div[2]/div/div/div/div[2]/div/div[2]/div/div/div/div/div[2]/div/div[3]/div/div/div/div/div[2]/div/table/tbody/tr/td[6]/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?
These you are using are not stable xpaths, use other much more generic and stable xpaths, each web element is recognizable by many different xpaths, some of which are very generic and do not change
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.
So you’re saying that this is limitation of UI.Vision RPA (the fact that there’s no unique identifier other than its position, and sometimes it’s one xpath and other times it’s a different one)?
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
I tried dm’ing you the url but it looks like I don’t have enough privilege - could I dm you on superuser/stackoverflow? (assuming you have the same username, no worries if you’d rather not!)
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.