Exemplo n.º 1
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(SelectItemNotVisibleBecauseOfScrollBar);
     RunTest(ListItemContainingTextbox, WindowsFramework.Wpf);
     RunTest(FindNonExistentObject, WindowsFramework.Wpf);
     RunTest(ListBoxWithScrollBarWithChangingItems, WindowsFramework.Wpf);
 }
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     listBoxUnderTest = MainWindow.Get<ListBox>("CheckedListBox");
     RunTest(CanCheckItem);
     RunTest(CheckSelectedItem);
     RunTest(CheckUncheckItem);
 }
Exemplo n.º 3
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectInputControls();
     RunTest(() => GetDate(DateTime.Today), WindowsFramework.WinForms);
     RunTest(() => GetDate(null), WindowsFramework.Wpf, WindowsFramework.Silverlight);
     RunTest(SetDate);
 }
Exemplo n.º 4
0
        public static SearchCriteria ByControlType(Type testControlType, WindowsFramework framework)
        {
            var searchCriteria = new SearchCriteria(SearchConditionFactory.CreateForControlType(testControlType, framework));

            searchCriteria.InferCustomItemType(testControlType);
            return(searchCriteria);
        }
Exemplo n.º 5
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectOtherControls();
     RunTest(Click);
     RunTest(ClickablePoint, WindowsFramework.Wpf); //TODO Figure out why this fails for Windows Forms
     RunTest(ClickHyperlinkFromLabel, WindowsFramework.Wpf);
 }
Exemplo n.º 6
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectOtherControls();
     RunTest(Click);
     RunTest(ClickablePoint, WindowsFramework.Wpf); //TODO Figure out why this fails for Windows Forms
     RunTest(ClickHyperlinkFromLabel, WindowsFramework.Wpf);
 }
Exemplo n.º 7
0
 public static SimpleSearchCondition CreateForControlType(Type testControlType, WindowsFramework framework)
 {
     ControlType controlType = testControlType.IsCustomType()
                                   ? CustomControlTypeMapping.ControlType(testControlType)
                                   : ControlDictionary.Instance.GetControlType(testControlType, framework);
     return CreateForControlType(controlType);
 }
Exemplo n.º 8
0
        internal static SearchCriteria ForMenuBar(WindowsFramework framework)
        {
            var searchCriteria =
                new SearchCriteria(SearchConditionFactory.CreateForControlType(typeof(MenuBar), framework.ToString()));

            return(searchCriteria.NotIdentifiedByText("System Menu Bar"));
        }
Exemplo n.º 9
0
 void GetPopupMenuItems(WindowsFramework framework)
 {
     MainWindow.Get<ListBox>("ListBoxWithVScrollBar").RightClick();
     var popup = MainWindow.Popup;
     int numberOfItems = framework == WindowsFramework.Wpf ? 2 : 4;
     Assert.Equal(numberOfItems, popup.Items.Count);
 }
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            var screen = Repository.Get <SomeGenericScreen <int, int> >(MainWindow.Title, InitializeOption.NoCache);

            screen.MakeWindowItemsMapDirty();
            Application.ApplicationSession.Save();
        }
Exemplo n.º 11
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectListControls();
     RunTest(()=>GetPopupMenuItems(framework));
     RunTest(ClickOnPopupMenu);
     RunTest(ClickOnNestedMenu);
 }
Exemplo n.º 12
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(GetModalWindow);
     RunTest(GetModalWindowBasedOnSearchCriteria);
     RunTest(GetControlFromModalWindowWhenSessionActive);
     RunTest(ThrowsWhenNotFound);
 }
Exemplo n.º 13
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(SelectItemNotVisibleBecauseOfScrollBar);
     RunTest(ListItemContainingTextbox, WindowsFramework.Wpf);
     RunTest(FindNonExistentObject, WindowsFramework.Wpf);
     RunTest(ListBoxWithScrollBarWithChangingItems, WindowsFramework.Wpf);
 }
Exemplo n.º 14
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectOtherControls();
     RunTest(MinimumValue);
     RunTest(MaximumValue);
     RunTest(Value);
 }
Exemplo n.º 15
0
 protected WhiteUITestBase(WindowsFramework framework)
 {
     Framework = framework;
     CoreAppXmlConfiguration.Instance.LoggerFactory = new ConsoleFactory(LoggerLevel.Debug);
     screenshotDir = @"c:\FailedTestsScreenshots";
     Directory.CreateDirectory(screenshotDir);
 }
Exemplo n.º 16
0
 protected WhiteUITestBase(WindowsFramework framework)
 {
     Framework = framework;
     CoreAppXmlConfiguration.Instance.LoggerFactory = new ConsoleFactory(LoggerLevel.Debug);
     screenshotDir = @"c:\FailedTestsScreenshots";
     Directory.CreateDirectory(screenshotDir);
 }
Exemplo n.º 17
0
        public void RunTest()
        {
            var frameworksToRun = SupportedFrameworks();

            foreach (var framework in frameworksToRun)
            {
                currentFramework = framework;
                using (SetMainWindow(framework))
                {
                    try
                    {
                        RunTest(framework);
                    }
                    catch (TestFailedException)
                    {
                        throw;
                    }
                    catch (Exception ex)
                    {
                        throw new TestFailedException(string.Format("Failed to run test for {0}", framework), ex);
                    }
                }
            }
            currentFramework = null;
        }
Exemplo n.º 18
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectOtherControls();
     RunTest(MinimumValue);
     RunTest(MaximumValue);
     RunTest(Value);
 }
Exemplo n.º 19
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectInputControls();
     RunTest(() => GetDate(DateTime.Today), WindowsFramework.WinForms);
     RunTest(() => GetDate(null), WindowsFramework.Wpf, WindowsFramework.Silverlight);
     RunTest(SetDate);
 }
Exemplo n.º 20
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(GetModalWindow);
     RunTest(GetModalWindowBasedOnSearchCriteria);
     RunTest(GetControlFromModalWindowWhenSessionActive);
     RunTest(ThrowsWhenNotFound);
 }
Exemplo n.º 21
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(FindMenuBar);
     RunTest(Click);
     RunTest(FindByAutomationId, WindowsFramework.Wpf);
     RunTest(FindMultiLevelMenuItem);
 }
Exemplo n.º 22
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     listBoxUnderTest = MainWindow.Get <ListBox>("CheckedListBox");
     RunTest(CanCheckItem);
     RunTest(CheckSelectedItem);
     RunTest(CheckUncheckItem);
 }
Exemplo n.º 23
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectListControls();
     RunTest(() => GetPopupMenuItems(framework));
     RunTest(ClickOnPopupMenu);
     RunTest(ClickOnNestedMenu);
 }
Exemplo n.º 24
0
        internal static Window Create(AutomationElement element, InitializeOption option, WindowSession windowSession)
        {
            SpecializedWindowFactory specializedWindowFactory = SpecializedWindowFactories.Find(factory => factory.DoesSpecializeInThis(element));

            if (specializedWindowFactory != null)
            {
                return(specializedWindowFactory.Create(element, option, windowSession));
            }

            var windowsFramework = new WindowsFramework(element.Current.FrameworkId);

            if (windowsFramework.WinForm)
            {
                return(new WinFormWindow(element, option, windowSession));
            }
            if (windowsFramework.WPF)
            {
                return(new WPFWindow(element, WindowFactory.Desktop, option, windowSession));
            }
            if (windowsFramework.Win32)
            {
                return(new Win32Window(element, WindowFactory.Desktop, option, windowSession));
            }
            if (windowsFramework.UIAutomationBug)
            {
                return(null);
            }
            throw new UIItemSearchException(string.Format("{0} is not supported yet.", windowsFramework));
        }
Exemplo n.º 25
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(FindMenuBar);
     RunTest(Click);
     RunTest(FindByAutomationId, WindowsFramework.Wpf);
     RunTest(FindMultiLevelMenuItem);
 }
Exemplo n.º 26
0
        void GetPopupMenuItems(WindowsFramework framework)
        {
            MainWindow.Get <ListBox>("ListBoxWithVScrollBar").RightClick();
            var popup         = MainWindow.Popup;
            int numberOfItems = framework == WindowsFramework.Wpf ? 2 : 4;

            Assert.Equal(numberOfItems, popup.Items.Count);
        }
Exemplo n.º 27
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectDataGridTab();
            table = MainWindow.Get <Table>("DataGrid");

            RunTest(GetRowTest);
            RunTest(GetMultipleRowsTest);
        }
Exemplo n.º 28
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectDataGridTab();
            table = MainWindow.Get<Table>("DataGrid");

            RunTest(GetRowTest);
            RunTest(GetMultipleRowsTest);
        }
Exemplo n.º 29
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectInputControls();
     spinner = MainWindow.Get <Spinner>("NumericUpDown");
     RunTest(Value);
     RunTest(Increment);
     RunTest(Decrement);
 }
Exemplo n.º 30
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectInputControls();
     spinner = MainWindow.Get<Spinner>("NumericUpDown");
     RunTest(Value);
     RunTest(Increment);
     RunTest(Decrement);
 }
Exemplo n.º 31
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     // ReSharper disable AccessToDisposedClosure
     using (var window = StartScenario("CustomUIItemScenario", "CustomUIItemScenario"))
     {
         RunTest(() => FindCustomItem(window));
         RunTest(() => NoDateUIItemMappingDefined(window));
     }
 }
Exemplo n.º 32
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     var window = OpenHorizontalSliderWindow();
     using (new DelegateDisposable(() => CloseSliderWindow(window)))
     {
         RunTest(()=>Find(window));
         RunTest(()=>Slide(window));
     }
 }
Exemplo n.º 33
0
 public void AccessKey(WindowsFramework framework)
 {
     var button = MainWindow.Get<Button>("ButtonWithTooltip");
     if (framework != WindowsFramework.Wpf) Assert.Equal("Alt+B", button.AccessKey);
     Keyboard.HoldKey(KeyboardInput.SpecialKeys.ALT);
     Keyboard.Enter("B");
     Keyboard.LeaveKey(KeyboardInput.SpecialKeys.ALT);
     Retry.For(() => Assert.Equal("Clicked", button.Text), TimeSpan.FromSeconds(2));
 }
Exemplo n.º 34
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     // ReSharper disable AccessToDisposedClosure
     using (var window = StartScenario("CustomUIItemScenario", "CustomUIItemScenario"))
     {
         RunTest(() => FindCustomItem(window));
         RunTest(() => NoDateUIItemMappingDefined(window));
     }
 }
Exemplo n.º 35
0
        public static SearchCondition CreateForControlType(Type testControlType, WindowsFramework framework)
        {
            if (testControlType.IsCustomType())
                return CreateForControlType(CustomControlTypeMapping.ControlType(testControlType, framework));
            var controlTypes = ControlDictionary.Instance.GetControlType(testControlType, framework.FrameworkId());
            if (controlTypes.Length == 1)
                return CreateForControlType(controlTypes[0]);

            return new OrSearchCondition(controlTypes.Select(CreateForControlType).ToArray());
        }
Exemplo n.º 36
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            var window = OpenHorizontalSliderWindow();

            using (new DelegateDisposable(() => CloseSliderWindow(window)))
            {
                RunTest(() => Find(window));
                RunTest(() => Slide(window));
            }
        }
Exemplo n.º 37
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectDataGridTab();
            table = MainWindow.Get<Table>("DataGrid");
            rows = table.Rows;

            RunTest(RowData);
            RunTest(GetRowAfterSortingOnAColumn);
            RunTest(Select);
        }
Exemplo n.º 38
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectInputControls();
     RunTest(IsReadOnly);
     RunTest(CopyTest);
     RunTest(EnterText);
     RunTest(EnterBulkText);
     RunTest(SuggestionList, WindowsFramework.WinForms);
     RunTest(SelectFromSuggestionList, WindowsFramework.WinForms);
 }
Exemplo n.º 39
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     SelectInputControls();
     RunTest(IsReadOnly);
     RunTest(CopyTest);
     RunTest(EnterText);
     RunTest(EnterBulkText);
     RunTest(SuggestionList, WindowsFramework.WinForms);
     RunTest(SelectFromSuggestionList, WindowsFramework.WinForms);
 }
Exemplo n.º 40
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectDataGridTab();
            table = MainWindow.Get <Table>("DataGrid");
            rows  = table.Rows;

            RunTest(RowData);
            RunTest(GetRowAfterSortingOnAColumn);
            RunTest(Select);
        }
Exemplo n.º 41
0
        protected override void RunTest(WindowsFramework framework)
        {
            var window = OpenVerticalSliderWindow();

            using (new DelegateDisposable(() => CloseSliderWindow(window)))
            {
                RunTest(() => Find(window));
                RunTest(() => Slide(window));
            }
        }
Exemplo n.º 42
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectOtherControls();
            slider = MainWindow.Get <Slider>("Slider");

            RunTest(SetValue);
            RunTest(LargeIncrement);
            RunTest(LargeDecrement);
            RunTest(SmallIncrement);
            RunTest(SmallDecrement);
        }
Exemplo n.º 43
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectOtherControls();
            slider = MainWindow.Get<Slider>("Slider");

            RunTest(SetValue);
            RunTest(LargeIncrement);
            RunTest(LargeDecrement);
            RunTest(SmallIncrement);
            RunTest(SmallDecrement);
        }
Exemplo n.º 44
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            tab = MainWindow.Get <Tab>("ControlsTab");

            RunTest(Find);
            RunTest(() => AssertChildrenCount(framework));
            RunTest(ShouldSelectTabPage);
            RunTest(ShouldSelectTabPageWithName);
            RunTest(FindControlsInsideTab);
            RunTest(TabWithReverseDisplayOrderTest, WindowsFramework.WinForms);
        }
Exemplo n.º 45
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            tab = MainWindow.Get<Tab>("ControlsTab");

            RunTest(Find);
            RunTest(()=>AssertChildrenCount(framework));
            RunTest(ShouldSelectTabPage);
            RunTest(ShouldSelectTabPageWithName);
            RunTest(FindControlsInsideTab);
            RunTest(TabWithReverseDisplayOrderTest, WindowsFramework.WinForms);
        }
Exemplo n.º 46
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectPropertyGridTab();
            propertyGrid = MainWindow.Get <PropertyGrid>("PropertyGrid");

            RunTest(Get);
            RunTest(Categories);
            RunTest(BrowseForValue);
            RunTest(CannotBrowseForValue);
            RunTest(Properties);
            RunTest(Property);
        }
Exemplo n.º 47
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectPropertyGridTab();
            propertyGrid = MainWindow.Get<PropertyGrid>("PropertyGrid");

            RunTest(Get);
            RunTest(Categories);
            RunTest(BrowseForValue);
            RunTest(CannotBrowseForValue);
            RunTest(Properties);
            RunTest(Property);
        }
Exemplo n.º 48
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(EnterAccentedChars);
     RunTest(EnterUnicodeCharacters);
     RunTest(MultilineTextBox);
     RunTest(ShouldSetTheValueOfATextBox);
     RunTest(ShouldBeAbleToPressLeftAndRightCursorKeys);
     RunTest(DoNotAllowToLeaveKeyWhichIsNotHeld);
     RunTest(CapsLock);
     RunTest(LeaveAllKeys);
     RunTest(LeaveKey);
 }
Exemplo n.º 49
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(EnterAccentedChars);
     RunTest(EnterUnicodeCharacters);
     RunTest(MultilineTextBox);
     RunTest(ShouldSetTheValueOfATextBox);
     RunTest(ShouldBeAbleToPressLeftAndRightCursorKeys);
     RunTest(DoNotAllowToLeaveKeyWhichIsNotHeld);
     RunTest(CapsLock);
     RunTest(LeaveAllKeys);
     RunTest(LeaveKey);
 }
Exemplo n.º 50
0
        protected override void RunTest(WindowsFramework framework)
        {
            DataGridUnderTest = MainWindow.Get <ListView>(SearchCriteria.ByAutomationId("DataGridControl"));
            var customControl = MainWindow.Get(SearchCriteria.ByAutomationId("CustomDataGridControl")) as UIItem;

            DataGridFromCustomControlUnderTest = customControl.Get <ListView>(SearchCriteria.ByAutomationId("DataGridControl"));

            RunTest(() => CanGetAllItems(DataGridUnderTest));
            RunTest(() => CanGetAllItems(DataGridFromCustomControlUnderTest));
            RunTest(() => CanGetCell(DataGridUnderTest));
            RunTest(() => CanGetCell(DataGridFromCustomControlUnderTest));
        }
Exemplo n.º 51
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectOtherControls();
            tree = MainWindow.Get<Tree>("TreeView");

            RunTest(NodeIsExpanded);
            RunTest(Expand);
            RunTest(Collapse);
            RunTest(Collapse);
            RunTest(DisplayState);
            RunTest(DoubleClick);
            RunTest(UnSelect, WindowsFramework.Wpf); // Winforms must have a selection
        }
Exemplo n.º 52
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectOtherControls();
            tree = MainWindow.Get <Tree>("TreeView");

            RunTest(NodeIsExpanded);
            RunTest(Expand);
            RunTest(Collapse);
            RunTest(Collapse);
            RunTest(DisplayState);
            RunTest(DoubleClick);
            RunTest(UnSelect, WindowsFramework.Wpf); // Winforms must have a selection
        }
Exemplo n.º 53
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectOtherControls();
            statusStrip = MainWindow.StatusBar(InitializeOption.NoCache);

            RunTest(Find);
            RunTest(ThrowsWhenDoesNotExists);
            RunTest(FindLabelInsideStatusBar);
            RunTest(ClickOnButtonAndFindPopupMenu);
            RunTest(FindDropDown);
            RunTest(ProgressBar);
            RunTest(ProgressBar2);
        }
Exemplo n.º 54
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectOtherControls();
            statusStrip = MainWindow.StatusBar(InitializeOption.NoCache);

            RunTest(Find);
            RunTest(ThrowsWhenDoesNotExists);
            RunTest(FindLabelInsideStatusBar);
            RunTest(ClickOnButtonAndFindPopupMenu);
            RunTest(FindDropDown);
            RunTest(ProgressBar);
            RunTest(ProgressBar2);
        }
Exemplo n.º 55
0
 protected override void RunTest(WindowsFramework framework)
 {
     CoreAppXmlConfiguration.Instance.LoggerFactory = new ConsoleFactory(LoggerLevel.Debug);
     ComboBoxUnderTest = MainWindow.Get <ComboBox>(SearchCriteria.ByAutomationId("AComboBox"));
     RunTest(ListItemInComboBoxWithoutTextAvailableInitially, WindowsFramework.Wpf);
     RunTest(CanSelectItemAtTopOfList);
     RunTest(CanGetAllItems);
     RunTest(CanSelectItemAtBottomOfList);
     RunTest(CanSelectItemAtTopOfList); // Once an item is selected at the bottom of the list, White couldn't select at the top again
     RunTest(CanSelectByIndex);
     RunTest(CanSelectReallyLongText);
     RunTest(SetValue);
 }
Exemplo n.º 56
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectDataGridTab();
            table = MainWindow.Get<Table>("DataGrid");
            TableRows rows = table.Rows;
            row = rows[0];

            RunTest(SetTextCellValue);
            RunTest(GetEmptyValue);
            RunTest(SetCheckBoxCellValue);
            RunTest(SetComboBoxCellValue);
            RunTest(TextOnButtonCell);
            RunTest(Click);
        }
Exemplo n.º 57
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     RunTest(CellCount);
     RunTest(CellText);
     RunTest(Columns);
     RunTest(MultiSelect);
     RunTest(RowCount);
     RunTest(SelectBasedOnCell);
     RunTest(SelectRow);
     RunTest(SelectScrolledRow);
     RunTest(SelectedRow);
     RunTest(SelectedRows);
     RunTest(SelectWhenHorizontalScrollIsPresent);
 }
Exemplo n.º 58
0
        protected override void ExecuteTestRun(WindowsFramework framework)
        {
            SelectDataGridTab();
            table = MainWindow.Get<Table>("DataGrid");

            RunTest(Find);
            RunTest(TableRows);
            RunTest(SelectRowNotVisibleInitially);
            RunTest(TableHasScrollBars);
            RunTest(Columns);
            RunTest(GetRow);
            RunTest(FindAllTest);
            RunTest(IsInTop);
        }
Exemplo n.º 59
0
 protected override void ExecuteTestRun(WindowsFramework framework)
 {
     ComboBoxUnderTest = MainWindow.Get<ComboBox>(SearchCriteria.ByAutomationId("AComboBox"));
     RunTest(ListItemInComboBoxWithoutTextAvailableInitially, WindowsFramework.Wpf);
     RunTest(ComboBoxWithAutoExpandCollapsedOnceItemsAreRetrieved);
     RunTest(ComboBoxOnlyCollapsesWhenExpansionWasForItemRetrieval);
     RunTest(CanSelectItemAtTopOfList);
     RunTest(CanGetAllItems);
     RunTest(CanSelectItemAtBottomOfList);
     RunTest(CanSelectItemAtTopOfList); // Once an item is selected at the bottom of the list, White couldn't select at the top again
     RunTest(CanSelectByIndex);
     RunTest(CanSelectReallyLongText);
     RunTest(SetValue);
 }
Exemplo n.º 60
0
        void GetControlBasedOnIndex(WindowsFramework framework)
        {
            using (var window = StartScenario("GetMultipleButton", "GetMultiple"))
            {
                var button = window.Get<Button>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Button").AndIndex(0));
                Assert.NotNull(button);

                var exception = Assert.Throws<AutomationException>(() => MainWindow.Get<TextBox>(SearchCriteria.ByNativeProperty(AutomationElement.NameProperty, "Button").AndIndex(4)));
                var expected = framework == WindowsFramework.Wpf?
                    "Failed to get ControlType=edit,AutomationElementIdentifiers.NameProperty=Button,Index=4":
                    "Failed to get (ControlType=edit or ControlType=document),AutomationElementIdentifiers.NameProperty=Button,Index=4";
                Assert.Equal(expected, exception.Message);
            }
        }