Recognizing objects with aria-hidden set true

I'm doing UI testing on a stand-alone application. We are going with UIA object recognition since we were having trouble before with other ways of implementation. Now that we have some part of of the software added to the object repositories, we noticed that some elements inside custom controls are not distinct from each other at all.

Going through the developers console, I noticed that there is "aria-hidden=True" statement in some of the elements that seem to be giving us difficulties. Changing that to "false" inside the console fixed the problem temporarily, but is of course not a permanent solution since that would kinda ruin the idea of automation in the first hand.

Is there a way to go around the aria-hidden statement with UFT? I tried some xpath and other DP implementations but I'm not sure if the problem is that they do not work with UIA or just that they cannot be found with the statement being true. Any tips for workarounds appreciated!

  • Usually UFT does not interact with hidden objects. Why would you pass any input to an object that is not visible for the user? As a user you can usually not interact with any object that you cannot see. 

    Maybe your application under tests uses multiple object that are in the same place like a hidden one for technical reasons and a visible one for the end user. If this is the case you can try to use the other visible object instead of the hidden one. 

  • Aria-hidden doesn't actually hide the objects from being visible, it hides them just from screen-readers. In this case the UFT UIAutomation object reader. From what I understand it is mainly used to reduce clutter when using accessibility tools and help users with difficulties to be able to focus on the relevant parts of the screen.

    Anyway the objects are relevant for our tests since being able to see that the error path produced correct error pop-up and of course to dismiss and continue the run from there. 

    There's always the possibility of just using an insight object for this, but thought it would be good idea to check if there's someone else having dealt with something similar as the insight objects are not the most reliable way of handling tests.