Page 1 of 1

On Upgrade of DevExpress Xpath changes

Posted: Fri Jan 03, 2020 2:27 pm
by alpesh.dhakad
Hi Team,
Everytime if DevExpress get upgraded to new version(for eg. DevExpress from 18.2 to 19.1), many of our xpath get changed which is causing lot of failures in our script. Could you please suggest a better way so that this issue will not happen next time.

I have created xpath using text but in Devexpress many containers are present which is getting changed which is also a reason for failure.
Please suggest

Re: On Upgrade of DevExpress Xpath changes

Posted: Fri Jan 03, 2020 4:11 pm
by odklizec
Hi,

I’m afraid, that without seeing the AUT, or, at very least, Ranorex snapshot (NOT screenshot), it’s impossible to suggest something reliable. But generally speaking, xpath failures, due to upgraded UI components, are not entirely avoidable. What you can do is to simplify the xpaths to such extent, that there is left only bare bone elements to uniquely identify your elements. On the other hand, too simple xpaths could either slow the element identification speed or make it less reliable.

Re: On Upgrade of DevExpress Xpath changes

Posted: Mon Jan 06, 2020 1:41 pm
by alpesh.dhakad
Hi ,

Our development team upgraded application from 18.2 to 19.1 devexpress where we are finding issue on finding xpath using text and xpath are also getting changed. In screenshots, highlighted text is been identified via Spy.
Not able to identify xpath using text at multiple places.

Please let us know the reasons and why so much of rework is required after application upgrade, why Ranorex not able to identify ?
Please refer attached snapshots and screenshots.

Re: On Upgrade of DevExpress Xpath changes

Posted: Mon Jan 06, 2020 1:42 pm
by alpesh.dhakad
Refer other screenshot as well for reference.

Re: On Upgrade of DevExpress Xpath changes

Posted: Tue Jan 07, 2020 8:40 am
by odklizec
Hi,

At first, you are using an outdated version of Ranorex. Version 8.3.1 is really too old and no longer supported. In other words, it does not make sense to debug such kind of problem with so old version.

At next, the DevExpress update most probably changed the structure and appearance of its components and therefore, Ranorex is not able to find element using old xpaths. The snapshot you posted clearly show, that the UI lists (their structure) now looks completely different.

So, your options are these...
Update Ranorex with most recent 9.2.1 an check if it Ranorex Spy is able to identify texts in the list items. Of course, you will most probably have to update the xpaths in your test. The original xpaths, stored in your test. will most probably not work even with updated Ranorex. There is simply no way around this. If DevExpress changed the internal structure of UI elements, you must update the xpaths according to those changes.

If Ranorex Spy is not able to read the texts from individual controls, you will have to try different WPF-related settings (in Ranorex Settings). And finally, if nothing helps, you will have to try GDI Capture approach, to get, at very least, RawTexts from these updated controls.