Page 1 of 1

Automatically change Xpath

Posted: Fri Apr 12, 2019 2:08 pm
by jakemashaw
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!

Re: Automatically change Xpath

Posted: Mon Apr 15, 2019 11:11 am
by odklizec
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!!!