Page 1 of 1

KeePass XPath Issues

Posted: Mon Feb 19, 2018 12:07 pm
by Fergal
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

Re: KeePass XPath Issues

Posted: Mon Feb 19, 2018 12:22 pm
by odklizec
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?

Re: KeePass XPath Issues

Posted: Mon Feb 19, 2018 3:16 pm
by Fergal
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.

Re: KeePass XPath Issues

Posted: Mon Feb 19, 2018 4:19 pm
by odklizec
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% ;)

Re: KeePass XPath Issues

Posted: Mon Feb 19, 2018 4:42 pm
by Fergal
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.