Automatically change Xpath

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
jakemashaw
Posts: 1
Joined: Fri Apr 12, 2019 1:59 pm

Automatically change Xpath

Post by jakemashaw » Fri Apr 12, 2019 2:08 pm

Hi All,

I've been setting some new path weights and such to help create some better repository items. A lot of the items that are created have to be identified by the AccessibleName or AccessibleDescription, the only problem is that some of these items have a value such as a number at the end like an ID. For example: dgo_ObjectID=#Ctrl12;

Currently I manually replace the number with .* so no matter the number it will find the item. Is there any way of setting something up where 'ID' part of the path is removed and replaced with something like the .*

Thanks!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5163
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Automatically change Xpath

Post by odklizec » Mon Apr 15, 2019 11:11 am

Hi,

I'm afraid, there is not any sort of automatic xpath update after changing xpath weight. Manual xpath editing is currently the only way. But I think you can make the update process a bit faster by editing rxrep file in a good text editor and using search/replace tool. Once you finish with editing, simply reload and rebuild the solution. But don't forget to save the solution in source control system of your choice, before editing rxrep outside Ranorex!!!
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration