예제 #1
0
        private void ClickOkIfExists()
        {
            // if database exists, click "yes"...
            MainWindowWrapper main = MainWindowWrapper.FindMainWindow(window.Current.ProcessId);
            bool found             = true;

            do
            {
                found = false;
                foreach (string title in new string[] { "Database Exists", "Need to Elevate" })
                {
                    AutomationElement child = main.FindChildWindow(title, 2);
                    if (child != null)
                    {
                        MessageBoxWrapper msg = new MessageBoxWrapper(child);
                        if (msg != null)
                        {
                            msg.ClickOk();
                        }
                        found = true;
                    }
                }
            }while (found);
        }
예제 #2
0
 public ContextMenu(AutomationElement control, bool isPopupMenu)
 {
     this.isPopupMenu = isPopupMenu;
     root             = MainWindowWrapper.FindMainWindow(control.Current.ProcessId);
     this.control     = control;
 }
예제 #3
0
 public TransactionViewWrapper(MainWindowWrapper window, AutomationElement control)
 {
     this.window  = window;
     this.control = control;
 }
예제 #4
0
 public ContextMenu(AutomationElement control)
 {
     root         = MainWindowWrapper.FindMainWindow(control.Current.ProcessId).Element;
     this.control = control;
 }