UI Automation - Selecting an Object Based on Multiple Identifiers

I am new to this. I use UI Automation to automate my application. Is there a way to identify an item based on a multiple identifier. there is currently a syntax below that only one identifier can identify.

AutomationElement okbtn = dialogbox.FindFirst (TreeScope.Children, new PropertyCondition (AutomationElement.NameProperty, "OK"));

I would like to highlight the name element of both NameProperty and ControlTypeProperty.

Please let me know if possible.

thanks

+4
source share
1 answer
Condition cMenuItem = new AndCondition( new PropertyCondition(AutomationElement.LocalizedControlTypeProperty,"text"), new PropertyCondition(AutomationElement.NameProperty,"Appointment")); AutomationElement aeMenuItem = aeTaskMenu.FindFirst(TreeScope.Descendants, cMenuItem); 
+9
source

All Articles