XPath depends on 32/64 bits

Class library usage, coding and language questions.
anas
Posts: 5
Joined: Sun May 12, 2013 6:25 pm

XPath depends on 32/64 bits

Post by anas » Sun May 12, 2013 6:31 pm

Hello
I just wonder if Xpath depends on the OS system and in particular on if it is 32 or 64 bits?

in my case the same element appears in 64 bits W7 as
.../element[@controlid='59419' and @class='Afx:DockPane:40000000:8:10003:10' and @instance='0']/element[@controlid='59412']/rawtext[@rawtext='abc']

and in 32bits W7 as
.../element[@controlid='59419' and @class='Afx:DockPane:400000:8:10003:10' and @instance='0']/element[@controlid='59412']/rawtext[@rawtext='?']

i.e.
'Afx:DockPane:40000000
vs
'Afx:DockPane:400000
with the rest being the same

thanks
anas

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: XPath depends on 32/64 bits

Post by Support Team » Mon May 13, 2013 3:31 pm

Hello Anas,

No the RxPath doesn't depend on the OS or the bit version, it should remain the same on different environments. This is the great advantage of the RxPath it doesn't depend on the environment.

The class names change in MFC with each new build of your solution, therefore it is different on your systems.
It is not recommended to use the class attribute with MFC applications, since they could change.
In order to overcome this issue, you could add a specific class or the whole process to the GDI capture list as described here: Testing of Legacy Applications.
You could also add a RanoreXPath Weight Rule to the RanoreXPath Weights Editor in order to exclude such class attributes from your RxPaths.

Regards,
Markus
.
Image

anas
Posts: 5
Joined: Sun May 12, 2013 6:25 pm

Re: XPath depends on 32/64 bits

Post by anas » Thu May 16, 2013 7:09 pm

thanks Markus for your help
i removed class name form Xpath and it works now
regards,
anas