示例#1
0
        private void ShowHideControl(BrowserWrapper browser)
        {
            // verify the second pager is hidden
            browser.First(".pagination").CheckIfIsDisplayed();
            browser.ElementAt(".pagination", 1).CheckIfIsNotDisplayed();
            browser.First("ul").FindElements("li").ThrowIfDifferentCountThan(2);
            // verify the second pager appears
            browser.Single("populate-button", this.SelectByDataUi).Click();

            // verify the second pager appears
            browser.First(".pagination").CheckIfIsDisplayed();
            browser.ElementAt(".pagination", 1).CheckIfIsDisplayed();
            browser.First("ul").FindElements("li").ThrowIfDifferentCountThan(3);

            // switch to another page
            browser.First(".pagination").ElementAt("li a", 4).Click();

            // verify the second pager is still visible
            browser.First(".pagination").CheckIfIsDisplayed();
            browser.ElementAt(".pagination", 1).CheckIfIsDisplayed();
            browser.First("ul").FindElements("li").ThrowIfDifferentCountThan(3);
        }
示例#2
0
        private static void Feature_StaticCommand_ComboBoxSelectionChangedViewModel_Core(BrowserWrapper browser)
        {
            browser.Wait();

            // select second value in the first combo box, the second one should select the second value too
            browser.ElementAt("select", 0).Select(1).Wait();
            browser.ElementAt("select", 0).ElementAt("option", 1).CheckIfIsSelected();
            browser.ElementAt("select", 1).ElementAt("option", 1).CheckIfIsSelected();

            // select third value in the first combo box, the second one should select the third value too
            browser.ElementAt("select", 0).Select(2).Wait();
            browser.ElementAt("select", 0).ElementAt("option", 2).CheckIfIsSelected();
            browser.ElementAt("select", 1).ElementAt("option", 2).CheckIfIsSelected();

            // select first value in the first combo box, the second one should select the first value too
            browser.ElementAt("select", 0).Select(0).Wait();
            browser.ElementAt("select", 0).ElementAt("option", 0).CheckIfIsSelected();
            browser.ElementAt("select", 1).ElementAt("option", 0).CheckIfIsSelected();

            // click the first button - the second value should be selected in the first select, the second select should not change
            browser.ElementAt("input", 0).Click().Wait();
            browser.ElementAt("select", 0).ElementAt("option", 1).CheckIfIsSelected();
            browser.ElementAt("select", 1).ElementAt("option", 0).CheckIfIsSelected();

            // click the second button - the third value should be selected in the second select, the first select should not change
            browser.ElementAt("input", 1).Click().Wait();
            browser.ElementAt("select", 0).ElementAt("option", 1).CheckIfIsSelected();
            browser.ElementAt("select", 1).ElementAt("option", 2).CheckIfIsSelected();

            // click the third button - the first value should be selected in the second select, the first select should not change
            browser.ElementAt("input", 2).Click().Wait();
            browser.ElementAt("select", 0).ElementAt("option", 1).CheckIfIsSelected();
            browser.ElementAt("select", 1).ElementAt("option", 0).CheckIfIsSelected();
        }