Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WinAppDriver - How do I get the list of properties available on an element

I am using Appium with WinAppDriver to control a WinForms / WPF application.

I am looking for a programmatic way to get the list of properties available on an element that has been retrieved.

My current thinking is to ask for the className and use this to look up a static dictionary of properties I have pre-configured.

var element = driver.FindElementByXPath(xPath);

var properties = element.getProperties();    // Is there something I can call here?

like image 967
Jason Avatar asked Nov 07 '22 20:11

Jason


1 Answers

This is not the greatest solution but I figured I would mention it just in case someone else might find it useful:

It is possible to get the xml of the pagesource and look at the properties there. This can be accomplished by calling driver.PageSource which will return an xml string.

Hope someone finds this useful.

like image 147
ThisWholeDev Avatar answered Nov 15 '22 07:11

ThisWholeDev