This project is read-only.

NativeProperty IsKeyboardFocusable

Apr 11, 2011 at 4:04 PM

Hi I have to find a button by his native property.

I search like:

main.Get<Button>(SearchCriteria.ByNativeProperty(AutomationElement.AutomationIdProperty, "Button_Rec1").AndNativeProperty(AutomationElementIdentifiers.IsKeyboardFocusableProperty, "true")).Click();

I know, that this button has the IsKeyboardFocusableProperty on true, but i get a large errormessage in my Nunit.

Without .AndNativeProperty(AutomationElementIdentifiers.IsKeyboardFocusableProperty, "true") the button will be found.


Maybe the String "true" is delivered as string, but has to be delivered as bool?


What's the solution?