Handle Win32 Dialog box in White
It seems that there's no exsited way to handle Win32 Dialog Box in White. At least I have not found till now.
// Click 'Yes' Button in Pop up Window
View Code
1 System.Windows.Automation.AutomationElement element = Desktop.Instance
2 .GetElement(SearchCriteria.ByNativeProperty(System.Windows.Automation.AutomationElement.ClassNameProperty, "#32770"));
3 element = element.FindFirst(System.Windows.Automation.TreeScope.Descendants,
4 new PropertyCondition(AutomationElement.NameProperty, "Yes", PropertyConditionFlags.IgnoreCase));
5 Button yesButton = new Button(element, new NullActionListener());
6 yesButton.Click();
2 .GetElement(SearchCriteria.ByNativeProperty(System.Windows.Automation.AutomationElement.ClassNameProperty, "#32770"));
3 element = element.FindFirst(System.Windows.Automation.TreeScope.Descendants,
4 new PropertyCondition(AutomationElement.NameProperty, "Yes", PropertyConditionFlags.IgnoreCase));
5 Button yesButton = new Button(element, new NullActionListener());
6 yesButton.Click();