Inconsistent Repo Paths

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
QATest879
Posts: 31
Joined: Fri Jul 02, 2021 2:35 pm

Inconsistent Repo Paths

Post by QATest879 » Thu Oct 13, 2022 6:22 pm

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.

raygoel
Posts: 9
Joined: Tue Sep 15, 2020 3:38 pm

Re: Inconsistent Repo Paths

Post by raygoel » Thu Oct 13, 2022 8:38 pm

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.

IvanF
Posts: 83
Joined: Thu Aug 11, 2022 8:55 pm

Re: Inconsistent Repo Paths

Post by IvanF » Fri Oct 14, 2022 4:54 pm

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