Dynamic X-Paths and Escape sequences
I am trying to use OpenRPA to replace a wordpress image.
But the image has a different X-Path every time. So the record button (or the Open Selector) doesn't select something that can be found in the next run. (GUIDS change every time)
Is there a way to work around that?
I tried to manually edit the Selector field in the Get Element -tool. But any edit (even a trailing space) breaks the content validation: "String constants must end with a double quote"
Once broken, I can't get it back to the unbroken state by removing the trailing space. The XAML file shows that a few things seem to go wrong with escape sequences:
... <snip> becomes: Selector="["[
... <snip> (and 6 more)
Allan Zimmermann last edited by
Always edit in the "selector editor" not the properties dialog, unless you reformat it all to use prober vb concating.
You need to find something that is Unique for the image ( or the element above it ) and modify the xpath selector to find that.
Feel free to post the xpath you get with recording and the url to the webpage, then I can have a look
Thanks again! The selector editor doesn't have the encoding problems.
I am experimenting on a wordpress site on my local NAS (before releasing it on a live site It is not reachable from the internet.
The xpath value is someting like:
But the value for id is different every time.
In the tree it is about 20 levels deep. I will really have to find something stable around it and go from there.
But all elements seem to have dynamic ids.
Wow, this is pretty hard to do... It feels like wordpress doesn't want its backend automated.