-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
I would like to call the following WinAppDriver API:
http://{IpAddress}:4723/session/{SessionId}/element/{elementId}/displayed
But I have found the results to be unreliable. Here are some examples:
Pop Up Dialog Occlusion
In this example I evaluate the label that says 'HOLD ME'.
Application Off Screen
Here I have dragged the application out of sight except the title bar.
Still the response for 'displayed' is 'true'.

Application Blocked by Another Application
In this case I have moved a folder in front of the application. I used the same 'HOLD ME' label as my element to query.

The response for 'displayed' is again 'true'.
Sidebar Menu
I will use the Text Entry on the left side as an element that gets blocked when the Sidebar menu is open.

For this example, the 'displayed' attribute also returns 'true'.
As a final example
I have an element where the Visible attribute in C# was set to NotVisible. I am showing the inspect tool highlighting the element below.

The 'displayed' attribute returns 'true' here as well.
The significance of all these examples is that they are possible scenarios in automation where an element I might want to interact with (tap, send keys, etc) will be reported as displayed and so I will attempt to execute some operations, but the execution will not go as expected. Is there a solution for these examples where I could determine if the element is indeed rendered? I have tried the 'IsOffScreen' attribute as well and the results seem to be identical.



