KeePass XPath Issues

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

KeePass XPath Issues

Post by Fergal » Mon Feb 19, 2018 12:07 pm

I am assisting a colleague who is new to Ranorex and she is going through the user guide and implementing the KeePass tests using Ranorex 8.0.1 on a Windows 10 laptop. When we record with Ranorex and click on items on KeePass these items are being added to the repository as Explorer list items, rather than KeePass objects.

For example the attached snapshot shows the object being added to the repository, by clicking on the KeePass password field.

Another member previously had a very similar issue:
madhunika wrote:...my object repository caputures Explorer screen everytime and the xpath is given below .
?/?/list[@controlid=1]....
From the bottom of this post

Would you please have any suggestions as to how we can get record and play to work correctly?

Thanks
Attachments
Password_Field_List.rxsnp
(40.81 KiB) Downloaded 15 times

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

Re: KeePass XPath Issues

Post by odklizec » Mon Feb 19, 2018 12:22 pm

Hi,

I think this is similar issue to the one discussed here:
https://www.ranorex.com/forum/wpf-combo ... 11774.html
I think it's system related issue/feature, where some Lists(dropdowns, etc..) are now (Win 10?) displayed outside the AUT as explorer items?
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

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: KeePass XPath Issues

Post by Fergal » Mon Feb 19, 2018 3:16 pm

Thanks a lot for your reply odklizec. Honestly, I'm not sure how relevant that is to our issue. We changed the "WPF Legacy/UIA Interaction" setting to "UiaOnly" and the issue is still there.

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

Re: KeePass XPath Issues

Post by odklizec » Mon Feb 19, 2018 4:19 pm

Hi,

The similarity is in the way Ranorex captures UI elements and show them outside the AUT tree. This behavior is something system related and there is probably nothing you can do about it. Unfortunately, in the snapshot you posted, there is saved only Desktop and not the problematic keepass elements. In my opinion, you will either have to change the xpath weight, to force Ranorex to capture different attribute than controlid (e.g. innertext). Otherwise, you may need to update recorded xpaths manually, to make them working as expected. Recorder is not something you should (or could) rely at 100% ;)
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

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: KeePass XPath Issues

Post by Fergal » Mon Feb 19, 2018 4:42 pm

Thank you odklizec. I can actually work round the issue by getting the elements from Spy. The difficulty is for someone learning Ranorex for the first time and following the chapters in the user guide, with the KeePass application.
odklizec wrote:Unfortunately, in the snapshot you posted, there is saved only Desktop and not the problematic keepass elements.
I suppose that's the problem, that's what Ranorex is capturing when a click on the item is recorded. Attached is a snapshot of the same element as captured through Spy.

Thanks again.
Attachments
Password_Field_KeePass.rxsnp
(67.2 KiB) Downloaded 13 times