Search code examples
c#visual-studiointellisensemicrosoft-ui-automation

Not all properties visible in Visual Studio IntelliSense for UIAutomation's AutomationElement class


The docs page for AutomationElement class at Microsoft indicates that the class has six properties. In my Visual Studio C# solution, IntelliSense shows only four; FocusedElement and RootElement are missing. When I look at the metadata, the properties are listed, so that tells me the documentation is not out-of-date:

enter image description here

I tried it in the Immediate window, and the result is the same, showing only four out of six properties:

enter image description here

Am I doing something wrong? If not, why is this happening?

I am on Windows 10 Professional using Visual Studio 2019 Enterprise with the latest build.


Solution

  • The two missing properties are static and they are not accessible by the class object.