Element Visible

uiautomation

#1

Ever noticed that the “Element Exist” sometimes returns true, even if the element of interest is not visible on the screen? It may be that the element is hidden behind another window, that the selector lingers after the element has vanished, or that the element selector/path has been loaded before the element is completely visible (e.g. on a website). In such cases, it would be really useful to have an “Element Visible” activity.

A pro tempore solution:
Enclose a “Highlight Element” activity within a try-catch, using a highlight time close to zero seconds. The “Highlight Element” activity will throw an exception if the element does not exists, or if it isn’t visible. Catch these exceptions, and carry on!


#2

Yes, Element Exists may return true and the element may be hidden. You should use Get Attribute ("Visibility") to determine if you have it on screen.


#3

Thanks, it works like a charm!

Where can I find an exhaustive list of the attributes, and other information like that? I looped through all of the attributes of an element (22 attributes), and I can see that the attributes of UiPath.Core.UiElement do not match the ones listed for the System.Windows.UiElement on MSDN: https://msdn.microsoft.com/en-us/library/system.windows.uielement(v=vs.110).aspx.


#4

You can use UI explorer to get attribute or can inspect them for desktop and web based apps.

Regards…!!
Aksh


#5

Hello everyone,

I’m currently trying to automate a Oracle Siebel process, tried to use the attribute Visibility as @badita said, but it doesnt make any difference even is its off screen the value of element visibility is always 1.

Any ideas on why could this be happening?

Regards
Pablo