public void Subtraction()
 {
     CalculatorSession.FindElementByName("Nine").Click();
     CalculatorSession.FindElementByName("Minus").Click();
     CalculatorSession.FindElementByName("One").Click();
     CalculatorSession.FindElementByName("Equals").Click();
     Assert.AreEqual("8", _GetCalculatorResultText());
 }
Exemple #2
0
 public void Addition_Advanced(string input1, string operation, string input2, string equals, string assertion)
 {
     CalculatorSession.FindElementByName(input1).Click();
     CalculatorSession.FindElementByName(operation).Click();
     CalculatorSession.FindElementByName(input2).Click();
     CalculatorSession.FindElementByName(equals).Click();
     Assert.AreEqual(assertion, _GetCalculatorResultText());
 }
 public void Multiplication()
 {
     CalculatorSession.FindElementByName("Nine").Click();
     CalculatorSession.FindElementByName("Multiply by").Click();
     CalculatorSession.FindElementByName("Nine").Click();
     CalculatorSession.FindElementByName("Equals").Click();
     Assert.AreEqual("81", _GetCalculatorResultText());
 }
 public void Addition()
 {
     CalculatorSession.FindElementByName("One").Click();
     CalculatorSession.FindElementByName("Plus").Click();
     CalculatorSession.FindElementByName("Seven").Click();
     CalculatorSession.FindElementByName("Equals").Click();
     Assert.AreEqual("8", _GetCalculatorResultText());
 }
 public void Division()
 {
     CalculatorSession.FindElementByName("Eight").Click();
     CalculatorSession.FindElementByName("Eight").Click();
     CalculatorSession.FindElementByName("Divide by").Click();
     CalculatorSession.FindElementByName("One").Click();
     CalculatorSession.FindElementByName("One").Click();
     CalculatorSession.FindElementByName("Equals").Click();
     Assert.AreEqual("8", _GetCalculatorResultText());
 }
 public void Combination()
 {
     CalculatorSession.FindElementByAccessibilityId("num7Button").Click();
     CalculatorSession.FindElementByAccessibilityId("multiplyButton").Click();
     CalculatorSession.FindElementByAccessibilityId("num9Button").Click();
     CalculatorSession.FindElementByAccessibilityId("plusButton").Click();
     CalculatorSession.FindElementByAccessibilityId("num1Button").Click();
     CalculatorSession.FindElementByAccessibilityId("equalButton").Click();
     CalculatorSession.FindElementByAccessibilityId("divideButton").Click();
     CalculatorSession.FindElementByAccessibilityId("num8Button").Click();
     CalculatorSession.FindElementByAccessibilityId("equalButton").Click();
     Assert.AreEqual("8", _GetCalculatorResultText());
 }
Exemple #7
0
 public void Combination_Advanced(string input1, string operation1, string input2, string operation2, string input3, string equals1, string assertion1,
                                  string operation3, string input4, string equals2, string assertion2)
 {
     CalculatorSession.FindElementByName(input1).Click();
     CalculatorSession.FindElementByName(operation1).Click();
     CalculatorSession.FindElementByName(input2).Click();
     CalculatorSession.FindElementByName(operation2).Click();
     CalculatorSession.FindElementByName(input3).Click();
     CalculatorSession.FindElementByName(equals1).Click();
     Assert.AreEqual(assertion1, _GetCalculatorResultText());
     CalculatorSession.FindElementByName(operation3).Click();
     CalculatorSession.FindElementByName(input4).Click();
     CalculatorSession.FindElementByName(equals2).Click();
     Assert.AreEqual(assertion2, _GetCalculatorResultText());
 }
Exemple #8
0
 public void Clear()
 {
     CalculatorSession.FindElementByName("Clear").Click();
     Assert.AreEqual("0", _GetCalculatorResultText());
 }