Object recognition issue on different OS

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Object recognition issue on different OS

Post by ziasim » Wed Apr 12, 2017 2:01 pm

Hi,

I have a problem on console based client application which has Delphi controls. So as it is a Delphi based application, I am using RAW GDI plugin to capture objects. Initially, I generated my scripts on Win7-64 bit OS. Later on when I tried to run same scripts on same console application version on WIn8.1 OS, some of the objects are failed to identify during script execution. The reason is, on 8.1 OS, it seems to use a different object path to locate same objects to perform actions on it.

The object is saved with path

"/form[@controlname='ConsoleForm']/element[@controlname='ActionMainMenuBar']/rawtext[@rawtext='Options' and @row='1']"

On Win7, it is working fine but when try to perform some action on same object in Win8.1, it failed to identify the object. If I update object path after excluding "@row=1" attribute, it starts working fine.

But with this exclusion of attribute, Ranorex is not able to uniquely identify same object on Win7 :cry:

So the path is not robust enough to locate this object on both machines having different OS. At the moment, I am using Ranorex v6.2.0

Also, have a look on the attached image to show you the SUT and object path saved in repository.


Will appreciate any feedback on this matter because atm I don't know how to tackle this situation.

Thanks,
You do not have the required permissions to view the files attached to this post.

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

Re: Object recognition issue on different OS

Post by odklizec » Wed Apr 12, 2017 2:18 pm

Hi,

Could you please upload a Ranorex snapshot (not screenshot) of the problematic element, both from Win 7 and Win 8.1? With snapshots, it's much easier for anyone here to suggest a reasonable solution.

Also, please make sure that the Ranorex configuration is set EXACTLY the same on both computers. Ideally, store the configuration within the solution, so then then you can be sure it's the same on both PCs.
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

ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Re: Object recognition issue on different OS

Post by ziasim » Wed Apr 12, 2017 2:46 pm

Hi Pavel,

Thanks for reply. I created snapshot of that element on both machines and attached as you said. With this path, on Win7, it is working fine but not on Win 8.1.

I also stored Ranorex configuration in my solution on Win7 where it is working and then imported same solution on Win8.1 but still having same issue. It means that the problem is not down to different Ranorex configurations on both machines.

Looking for more feedback....!

Regards,
You do not have the required permissions to view the files attached to this post.

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

Re: Object recognition issue on different OS

Post by odklizec » Wed Apr 12, 2017 3:28 pm

Well, looking at the snapshots, the problem is that on Win7, all menu elements are doubled (not just 'Options'). Could it be a bug in your app at Win7?

If you eliminate the "row" attribute from the xpath, Ranorex still finds one of the 'Options' at Win7. Is it important for you to find the exact one in row=1? RawText in both instances of the element is exactly the same, so why to bother with exact identification? ;)

Eventually, you can use xpath like this to identify the "correct" Options element:

Code: Select all

/form[@controlname='ConsoleForm']/element[@controlname='ActionMainMenuBar']/rawtext[@rawtext='Options' and @column~'1|2']
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

ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Re: Object recognition issue on different OS

Post by ziasim » Wed Apr 12, 2017 4:28 pm

- With regards to showing double menu elements, It could be a bug in our application in win7 environment.

- It is not necessary to use row in xpath to identify elements, that's why I used the guideline you provided i,e used @column~'    1|2' in xpath and its working fine.

Thanks for prompt help. Now I can handle many other similar object identification problems :)

Regards,