예제 #1
0
        public static AutomationElement MenuItemOpenWindow(AutomationElement menu, params string[] menuNames)
        {
            var menuItem = MenuItemFind(menu, menuNames);

            AutomationElement newWindow = menu.CaptureWindow(
                () => menuItem.ButtonInvoke(),
                () => "New windows opened after menu  " + menuNames.ToString(" -> "));

            return(newWindow);
        }
예제 #2
0
 public static AutomationElement ButtonInvokeCapture(this AutomationElement button, Func <string> actionDescription = null, int?timeOut = null)
 {
     return(button.CaptureWindow(() => button.ButtonInvoke(), actionDescription, timeOut));
 }