Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created August 27, 2017 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/75ca45ded5f4a119865caab147e6cd4a to your computer and use it in GitHub Desktop.
Save angelovstanton/75ca45ded5f4a119865caab147e6cd4a to your computer and use it in GitHub Desktop.
[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