Page 1 of 1

Inconsistent Repo Paths

Posted: Thu Oct 13, 2022 6:22 pm
by QATest879
Sometimes when I use spy on my application the red box will surround the entire application and the RXPath base will be "/form[@title=<title>]
but other times if I use spy on the same application as above, there will be a box highlighting each element on the application as I hover over it with the mouse (it doesn't do this in the first scenario) and in this case the RXPath always starts with "/form[@automationid='JavaFX1']."

I don't understand why it behaves inconsistently despite using the same application in both cases. Does anybody know why this might happen? Thank you.

Re: Inconsistent Repo Paths

Posted: Thu Oct 13, 2022 8:38 pm
by raygoel
I have experienced something similar when we upgraded from 9.3 to 10.2.4. I had to rebuild a lot of the repository elements using the spy. Most of the tests we have are broken after this update.

Re: Inconsistent Repo Paths

Posted: Fri Oct 14, 2022 4:54 pm
by IvanF
Hi, the root identification switch could happen if the Studio/Spy are started differently - with and without the administrator privileges. The "without" case forces the apps to use a different plugin for finding the element and the recorded path.

For automation IDs specifically, dynamic ones could cause detection issues, so you could consider:
1) increasing robustness via slider;
2) choosing a different attribute at the same level (either manually in repository or by manipulating attribute weight settings; maybe "title" is not great either in your case);
3) unchecking tree elements in Spy Path Editor to focus on the last piece only;
4) dragging the repository object out of the hierarchy