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
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,
Object recognition issue on different OS
Object recognition issue on different OS
You do not have the required permissions to view the files attached to this post.
Re: Object recognition issue on different OS
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.
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 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
Re: Object recognition issue on different OS
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,
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.
Re: Object recognition issue on different OS
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:
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 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
Re: Object recognition issue on different OS
- 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,
- 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,