コード例 #1
0
        public ComboBoxTests(TestAppFixture fixture)
        {
            _session = fixture.Session;

            var tabs = _session.FindElementByAccessibilityId("MainTabs");
            var tab  = tabs.FindElementByName("ComboBox");

            tab.Click();
        }
コード例 #2
0
        public AutomationTests(TestAppFixture fixture)
        {
            _session = fixture.Session;

            var tabs = _session.FindElementByAccessibilityId("MainTabs");
            var tab  = tabs.FindElementByName("Automation");

            tab.Click();
        }
コード例 #3
0
        public MenuTests(TestAppFixture fixture)
        {
            _session = fixture.Session;

            var tabs = _session.FindElementByAccessibilityId("MainTabs");
            var tab  = tabs.FindElementByName("Menu");

            tab.Click();

            var reset = _session.FindElementByAccessibilityId("MenuClickedMenuItemReset");

            reset.Click();

            var clickedMenuItem = _session.FindElementByAccessibilityId("ClickedMenuItem");

            Assert.Equal("None", clickedMenuItem.Text);
        }
コード例 #4
0
        public WindowTests_MacOS(TestAppFixture fixture)
        {
            var retry = 0;

            _session = fixture.Session;

            for (;;)
            {
                try
                {
                    var tabs = _session.FindElementByAccessibilityId("MainTabs");
                    var tab  = tabs.FindElementByName("Window");
                    tab.Click();
                    return;
                }
                catch (WebDriverException e) when(retry++ < 3)
                {
                    // MacOS sometimes seems to need a bit of time to get itself back in order after switching out
                    // of fullscreen.
                    Thread.Sleep(1000);
                }
            }
        }