コード例 #1
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();
        }