public void TestDivZeroException()
        {
            string buttonID_A    = TestContext.DataRow["Input Button A"].ToString();
            string buttonID_B    = TestContext.DataRow["Input Button B"].ToString();
            string buttonID_Sign = TestContext.DataRow["Input Button Sign"].ToString();
            string webDriver     = TestContext.DataRow["WebDriver"].ToString();
            string exp           = TestContext.DataRow["Expected Result"].ToString();

            pom = new POM(GetDriver(webDriver), url);
            pom.ClickButton(buttonID_A);
            pom.ClickButton(buttonID_Sign);
            pom.ClickButton(buttonID_B);
            pom.ClickCalcButton();
            string actual = pom.GetAlertMessage();

            Assert.AreEqual(exp, actual);
        }
Esempio n. 2
0
        public void TestDivZeroException(string elementA, string elementB, string operation, string exp)
        {
            test = extent.StartTest("Exception test: " + exp);

            test.Log(LogStatus.Info, "StartTest() method will return the Extent Test object ");
            test.Log(LogStatus.Info, "I am in actual test method");
            test.Log(LogStatus.Info, "We Can Write The Actual Test Logic In This Test");

            pom.NavigateToPage();
            pom.ClickButton(elementA);
            pom.ClickButton(operation);
            pom.ClickButton(elementB);
            pom.ClickCalcButton();
            string actual = pom.GetAlertMessage();

            Assert.AreEqual(exp, actual);

            extent.EndTest(test);
        }