On Upgrade of DevExpress Xpath changes

Ask general questions here.
alpesh.dhakad
Posts: 25
Joined: Wed Oct 31, 2018 2:10 pm

On Upgrade of DevExpress Xpath changes

Post by alpesh.dhakad » Fri Jan 03, 2020 2:27 pm

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

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

Re: On Upgrade of DevExpress Xpath changes

Post by odklizec » Fri Jan 03, 2020 4:11 pm

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.
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

alpesh.dhakad
Posts: 25
Joined: Wed Oct 31, 2018 2:10 pm

Re: On Upgrade of DevExpress Xpath changes

Post by alpesh.dhakad » Mon Jan 06, 2020 1:41 pm

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.
Attachments
Delete - Highlighted_Previous Version_DevExpress_Before_Upgrade.png
Before Upgrade Delete button get highligthed
Delete - Highlighted_Previous Version_DevExpress_Before_Upgrade.png (241.61 KiB) Viewed 144 times
ItemsNotIdentifiedByText.rxsnp
After Upgrade
(52.43 KiB) Downloaded 8 times
ItemsIdentifiedByText_BeforeDevExpressUpgrade.rxsnp
Before Upgrade
(410.16 KiB) Downloaded 7 times
Last edited by alpesh.dhakad on Mon Jan 06, 2020 1:44 pm, edited 1 time in total.

alpesh.dhakad
Posts: 25
Joined: Wed Oct 31, 2018 2:10 pm

Re: On Upgrade of DevExpress Xpath changes

Post by alpesh.dhakad » Mon Jan 06, 2020 1:42 pm

Refer other screenshot as well for reference.
Attachments
Detectors - Not Highlighted_DevExpress_After_Upgrade.png
Detectors - Not Highlighted_DevExpress_After_Upgrade.png (256.76 KiB) Viewed 144 times
Detectors - Highlighted_Previous_DevExpress_Before_Upgrade.png
Detectors - Highlighted_Previous_DevExpress_Before_Upgrade.png (255.46 KiB) Viewed 144 times
Delete - Not Highlighted__DevExpress_After_Upgrade.png
Delete - Not Highlighted__DevExpress_After_Upgrade.png (218.25 KiB) Viewed 144 times

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

Re: On Upgrade of DevExpress Xpath changes

Post by odklizec » Tue Jan 07, 2020 8:40 am

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.
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