Created
August 27, 2017 20:40
-
-
Save angelovstanton/75ca45ded5f4a119865caab147e6cd4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void Addition() | |
{ | |
_driver.FindElementByName("Five").Click(); | |
_driver.FindElementByName("Plus").Click(); | |
_driver.FindElementByName("Seven").Click(); | |
_driver.FindElementByName("Equals").Click(); | |
var calculatorResult = GetCalculatorResultText(); | |
Assert.AreEqual("12", calculatorResult); | |
} | |
private string GetCalculatorResultText() | |
{ | |
return _driver.FindElementByAccessibilityId("CalculatorResults").Text.Replace("Display is", string.Empty).Trim(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment