public void TestOverflowException() { 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); for (int i = 0; i < 15; i++) { pom.ClickButton(buttonID_A); } pom.ClickButton(buttonID_Sign); pom.ClickButton(buttonID_B); pom.ClickCalcButton(); string actual = pom.GetResult(); if (actual == exp) { pom.CreateSceenshot(); } Assert.AreEqual(exp, actual); }
public void TestElementExistance() { string buttonID = TestContext.DataRow["Input Button"].ToString(); string webDriver = TestContext.DataRow["WebDriver"].ToString(); pom = new POM(GetDriver(webDriver), url); pom.ClickButton(buttonID); Assert.IsTrue(true); }
public void TestButton() { string buttonID = TestContext.DataRow["Input Button"].ToString(); string webDriver = TestContext.DataRow["WebDriver"].ToString(); string exp = TestContext.DataRow["Expected Result"].ToString(); pom = new POM(GetDriver(webDriver), url); pom.ClickButton(buttonID); string actual = pom.GetResult(); Assert.AreEqual(exp, actual); }
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); }