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); }
public ContextMenu(AutomationElement control, bool isPopupMenu) { this.isPopupMenu = isPopupMenu; root = MainWindowWrapper.FindMainWindow(control.Current.ProcessId); this.control = control; }
public TransactionViewWrapper(MainWindowWrapper window, AutomationElement control) { this.window = window; this.control = control; }
public ContextMenu(AutomationElement control) { root = MainWindowWrapper.FindMainWindow(control.Current.ProcessId).Element; this.control = control; }