WinAppDriver
WinAppDriver copied to clipboard
How to find the Popup element in WPF?
I have readed the issue #419 , but it don't work for me. I want to find a MenuItem
element in a WPF program, and I get the XPath by the following two way. They provide different values, but they can NOT find the element.
-
Inspect.exe: It thinks that
MenuItem
is an element on WPFWindow
. -
WinAppDriverUiRecoder: It thinks that
MenuItem
is aWindow
(Popup
) on root (Desktop).
What's more, I found a horrible thing: the following two pieces of code differ only in one line (winElem1.Click()
), however, using the same XPath and session, the elements obtained before and after the change are different. It looks like the winElem1.Click()
emptied the entire desktop element!
==========================================
POST /session/BB5B35A6-1710-4BCF-9928-714445F8D861/elements HTTP/1.1
Accept: application/json, image/png
Content-Length: 31
Content-Type: application/json;charset=utf-8
Host: 127.0.0.1:4723
{"using":"xpath","value":"//*"}
HTTP/1.1 200 OK
Content-Length: 74
Content-Type: application/json
{"sessionId":"BB5B35A6-1710-4BCF-9928-714445F8D861","status":0,"value":[]}
==========================================
Anyupdate on this.. Even im facing issues while handling popups...
Let me know the version of appium driver your using..
It seems to me that we don't have any possibility to get elements under the PopupRoot
element in the WPF visual tree.
Is that assumption correct?
Background: How to work with Comboboxes / DropDownButtons with Flyout open?
Windows App Driver version 1.2.2009.2003 Appium.Webdriver Nuget 4.3.2