Skip to content

GET -> 'displayed' attribute returns true when element is not displayed #517

@DGCBio

Description

@DGCBio

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'.

Before the occlusion:
screenshot_tools tap platforms uwp uwpplatform_55e6dee0-88cc-4068-ad07-18152564a9f0-20181105092458517

Pop Up is blocking it:
screenshot_tools tap platforms uwp uwpplatform_55e6dee0-88cc-4068-ad07-18152564a9f0-20181105092507963

Here is the result:
image

Application Off Screen
Here I have dragged the application out of sight except the title bar.

image

Still the response for 'displayed' is 'true'.
image

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.
image

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.
image

image

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.
image

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions