Ejemplo n.º 1
0
 public void Can_Click_Btn3()
 {
     driver.Navigate().GoToUrl(baseURL);
     var calculator = new CalculatorPOM(driver);
     PageFactory.InitElements(driver, calculator);
     calculator.btn3.Click();
     var actual = calculator.resultWindow.GetAttribute("value");
     Assert.AreEqual("3", actual);
 }
Ejemplo n.º 2
0
            public void Can_Find_Btn2()
            {
                driver.Navigate().GoToUrl(baseURL);
                var calculator = new CalculatorPOM(driver);

                PageFactory.InitElements(driver, calculator);
                var btn2 = calculator.btn2;

                Assert.IsNotNull(btn2);
            }
Ejemplo n.º 3
0
            public void Can_Click_Btn0()
            {
                driver.Navigate().GoToUrl(baseURL);
                var calculator = new CalculatorPOM(driver);

                PageFactory.InitElements(driver, calculator);
                calculator.btn0.Click();
                var actual = calculator.resultWindow.GetAttribute("value");

                Assert.AreEqual("0", actual);
            }
Ejemplo n.º 4
0
            public void Can_Get_Alert()
            {
                driver.Navigate().GoToUrl(baseURL);
                var calculator = new CalculatorPOM(driver);

                PageFactory.InitElements(driver, calculator);
                calculator.btn9.Click();
                calculator.btnDiv.Click();
                calculator.btn0.Click();
                calculator.btnEqual.Click();
                var alert = driver.SwitchTo().Alert().Text;

                Assert.AreEqual("You can't devide by zero", alert);
            }
Ejemplo n.º 5
0
            public void Can_Do_Div_Action()
            {
                driver.Navigate().GoToUrl(baseURL);
                var calculator = new CalculatorPOM(driver);

                PageFactory.InitElements(driver, calculator);
                calculator.btn9.Click();
                calculator.btnDiv.Click();
                calculator.btn3.Click();
                calculator.btnEqual.Click();
                var actual = calculator.resultWindow.GetAttribute("value");

                Assert.AreEqual("3", actual);
            }
Ejemplo n.º 6
0
 public void Can_Get_Alert()
 {
     driver.Navigate().GoToUrl(baseURL);
     var calculator = new CalculatorPOM(driver);
     PageFactory.InitElements(driver, calculator);
     calculator.btn9.Click();
     calculator.btnDiv.Click();
     calculator.btn0.Click();
     calculator.btnEqual.Click();
     var alert = driver.SwitchTo().Alert().Text;
     Assert.AreEqual("You can't devide by zero", alert);
 }
Ejemplo n.º 7
0
 public void Can_Find_BtnSub()
 {
     driver.Navigate().GoToUrl(baseURL);
     var calculator = new CalculatorPOM(driver);
     PageFactory.InitElements(driver, calculator);
     var btnSub = calculator.btnSub;
     Assert.IsNotNull(btnSub);
 }
Ejemplo n.º 8
0
 public void Can_Do_Mul_Action()
 {
     driver.Navigate().GoToUrl(baseURL);
     var calculator = new CalculatorPOM(driver);
     PageFactory.InitElements(driver, calculator);
     calculator.btn4.Click();
     calculator.btnMul.Click();
     calculator.btn5.Click();
     calculator.btnEqual.Click();
     var actual = calculator.resultWindow.GetAttribute("value");
     Assert.AreEqual("20", actual);
 }