110,534
社区成员
发帖
与我相关
我的任务
分享
condition = new PropertyCondition(AutomationElement.AutomationIdProperty, "statusStrip1");
condition2 = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.StatusBar);
andConditon = new AndCondition(condition, condition2);
element = rootElement.FindFirst(TreeScope.Descendants, andConditon);
if (element != null)
{
//condition = new PropertyCondition(AutomationElement.AutomationIdProperty, "Statusbar.Pane1");
condition = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Edit);
var statusbar = element.FindFirst(TreeScope.Descendants, condition);