Exemple #1
0
        public void TestMetricsDistanceSimple()
        {
            var webpage        = new CalcWebpageModel(driver);
            var metricsWebpage = webpage.GoToMetricsWebpage();

            metricsWebpage.KmField = 4.ToString();
            metricsWebpage.ClickDistanceSubmit();

            Assert.AreEqual(2.48.ToString(), metricsWebpage.MilesField);
        }
Exemple #2
0
        public void TestMathCalculatorSimpleAddition()
        {
            var webpage = new CalcWebpageModel(driver);

            webpage.InsertFirstNumber(4.ToString());
            webpage.InsertSecondNumber(4.ToString());
            webpage.SelectOperationByText("Addition");
            webpage.Submit();

            Assert.AreEqual(webpage.GetResult(), 8.ToString());
        }
Exemple #3
0
        public void TestMathCalculatorSafetyOfForms()
        {
            var webpage = new CalcWebpageModel(driver);

            webpage.InsertFirstNumber("im string");

            webpage.InsertSecondNumber("i am string too");


            Assert.AreEqual(webpage.FirstNumberField, string.Empty);

            Assert.AreEqual(webpage.SecondNumberField, string.Empty);
        }