public void DoClientSideValidation()
        {
            Login();
            FindProduct("LW-1000");
            br.ClickEdit();
            IWebElement days = br.GetField("Product-DaysToManufacture");

            days.AssertInputValueEquals("0");
            days.TypeText("100", br);
            days.AppendText(Keys.Tab, br);
            br.WaitForAjaxComplete();
            IWebElement valMsg = days.FindElement(By.ClassName("field-validation-error"));

            Assert.AreEqual("Value is outside the range 1 to 90", valMsg.Text);
        }
Esempio n. 2
0
        public void DoClientSideValidation()
        {
            Login();
            FindProduct("LW-1000");
            br.ClickEdit();
            IWebElement days = br.GetField("Product-DaysToManufacture");

            days.AssertInputValueEquals("0");
            days.TypeText("100", br);
            days.AppendText(Keys.Tab, br);
            br.FindElement(By.CssSelector("#body")).BrowserSpecificClick(br); // to move focus off field - tab doesn't seem to work on all browsers
            br.WaitForAjaxComplete();
            IWebElement valMsg = days.FindElement(By.ClassName("field-validation-error"));

            Assert.AreEqual("Value is outside the range 1 to 90", valMsg.Text);
        }