Finding WPF panel in WinAppDriver
In my WPF window, i have panel (stack panel, grid panel...) In Inspector i can see them

However i cannot select them with WinAppDriver (by accessibility, by class name....)

The other control like button or textbox can still be found normally. Is there anyway i can get the panel of WPF from WinAppDriver?
UPDATE: Looks like not only panel, but any control that doesn't have user interaction (a line for example) cannot be selected too. Is it a designation or a bug? I really need the panel coordination and size, without selecting it, how can i get it?
Close this issue because i can find them via XPath.
Hey, i am also facing the same issue, could you please provide the XPath what u have written to access that panel.
@Vasanthi30
You may have a look at your session's PageSource before write XPath query because it's much easier to see than using Inspector.
My example case:
WindowSession.FindElementByXPath("/Window/Pane") will return exactly the pane that I'm selecting in my question's screenshot.
or:
WindowSession.FindElementByXPath("/Window/Pane[@FrameworkId=\"WPF\"]").GetAttribute("ClassName") will return "ScrollViewer"
Many Thanks @khoachung89
Are you creating session similar to the below lines of code?
DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.SetCapability("app", _applicationPath);
appCapabilities.SetCapability("deviceName", "WindowsPC");
Session = new WindowsDriver
Yes, something like that.
On Tue, Aug 27, 2019, 6:26 PM Vasanthi30 [email protected] wrote:
Many Thanks @khoachung89 https://github.com/khoachung89
Are you creating session similar to the below lines of code? DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.SetCapability("app", _applicationPath); appCapabilities.SetCapability("deviceName", "WindowsPC"); Session = new WindowsDriver(new Uri(WindowsApplicationDriverUrl), appCapabilities);
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/WinAppDriver/issues/818?email_source=notifications&email_token=AA7EXYKMEQJPG7HOBY2Q5LDQGUFPFA5CNFSM4INSM3M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5HNCJI#issuecomment-525259045, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7EXYPGV5W62NTIHR6Z5BTQGUFPFANCNFSM4INSM3MQ .