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);
        }
示例#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);
        }
示例#3
0
        public void DoRemoteValidationParameterPopup()
        {
            Login();
            br.TogglePopups(true);
            FindProduct("LW-1000");
            br.ClickAction("Product-BestSpecialOffer");
            IWebElement qty = br.GetField("Product-BestSpecialOffer-Quantity");

            qty.AssertInputValueNotEquals("0");
            qty.TypeText("0", br);
            qty.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 = br.FindElement(By.ClassName("field-validation-error"));

            Assert.AreEqual("Quantity must be > 0", valMsg.Text);
        }
示例#4
0
        public void DoRemoteValidationProperty()
        {
            Login();
            br.ClickAction("WorkOrderRepository-RandomWorkOrder");
            br.AssertContainsObjectView();
            br.ClickEdit();
            IWebElement qty = br.GetField("WorkOrder-OrderQty");

            qty.AssertInputValueNotEquals("0");
            qty.TypeText("0", br);
            qty.AppendText(Keys.Tab, br);
            br.GetField("WorkOrder-ScrappedQty").TypeText("0", 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 = br.FindElement(By.ClassName("field-validation-error"));

            Assert.AreEqual("Order Quantity must be > 0", valMsg.Text);
        }