Esempio n. 1
0
 public void SetJsInputPropertyTest()
 {
     RunInAllBrowsers(browser =>
     {
         browser.NavigateToUrl("JSPropertySetTest.aspx");
         var input = browser.First("#input1");
         const string inputValue = "4012 5770 5655";
         input.SetJsElementProperty("value", inputValue);
         AssertUI.CheckIfValue(input, inputValue);
         Assert.AreEqual(input.GetJsElementPropertyValue("value"), inputValue);
     });
 }
Esempio n. 2
0
 public void CheckValueTest()
 {
     RunInAllBrowsers(browser =>
     {
         browser.NavigateToUrl("valuetest.aspx");
         AssertUI.CheckIfValue(browser.First("#input-radio"), "radio1");
         AssertUI.CheckIfValue(browser.First("#input-radio2"), "radio2");
         AssertUI.CheckIfValue(browser.First("#checkbox1"), "checkboxvalue1");
         AssertUI.CheckIfValue(browser.First("#checkbox2"), "checkboxvalue2");
         AssertUI.CheckIfValue(browser.First("#area"), "areavalue");
         AssertUI.CheckIfValue(browser.First("#input-text"), "text1");
         AssertUI.CheckIfValue(browser.First("#input-text"), "texT1", false);
         AssertUI.CheckIfValue(browser.First("#input-text"), "   texT1   ", false);
     });
 }
Esempio n. 3
0
        public void ButtonClickTest()
        {
            RunInAllBrowsers(browser =>
            {
                browser.NavigateToUrl("/ClickTest.aspx");

                var button = browser.First("button");
                var input  = browser.First("#testInput");

                //check init
                AssertUI.CheckIfValue(input, "0");

                //click and check if the driver clicked only once
                button.Click();
                AssertUI.CheckIfValue(input, "1");

                //click and check if the driver clicked only once
                button.Click();
                AssertUI.CheckIfValue(input, "2");

                //click and check if the driver clicked only once
                button.Click();
                button.Click();
                AssertUI.CheckIfValue(input, "4");

                //click and check if the driver clicked only once
                button.Click();
                button.Click();
                button.Click();
                button.Click();
                button.Click();
                button.Click();
                button.Click();
                button.Click();
                button.Click();
                AssertUI.CheckIfValue(input, "13");
            });
        }