Woodgnome
Woodgnome

Reputation: 2391

Why do automation element properties not match the value from Inspect?

Having fetched an AutomationElement I get the IsContentElement property using:

bool isContentElement = (bool)element.GetCurrentPropertyValue(AutomationElement.IsContentElementProperty);
Console.WriteLine(isContentElement);

Outputs True in my application.

Using Inspect.exe (installed from https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) the value for IsContentElement is False.

I am 99% certain my application and Inspect.exe are looking at the element (same bounding box, same control type, same name - the down arrow of the vertical scroll bar in File Explorer Windows 10).

Seems to apply to other properties as well. Why do they not match up?

Upvotes: 1

Views: 410

Answers (0)

Related Questions