Пример #1
0
        public void InvokePattern_ReadFromButton_CanInvoked()
        {
            var button = UI.GetChild(By.AutomationId("CUI_ShowMessageBox_Button"), From.Element(_mainWindow));

            var pattern = Patterns.GetInvokePattern(button.AutomationElement);

            pattern.Invoke();

            DynamicSleep.Wait(1000);
            var messageBox = WindowFinder.Search <BasicMessageBox>(Use.Title("MessageBoxTitle"));

            messageBox.OKButton.Unsafe.Click();
        }
Пример #2
0
            /// <summary>
            /// Invokes a click on the Button.
            /// </summary>
            public void Click()
            {
                var pattern = Patterns.GetInvokePattern(_automationElement);

                pattern.Invoke();
            }