Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Morkkis Regular Contributor.
Regular Contributor.
188 views

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!

0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Betreff: Recognizing objects with aria-hidden set true

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. 

0 Likes
Morkkis Regular Contributor.
Regular Contributor.

Betreff: Recognizing objects with aria-hidden set true

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.

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.