Created
September 2, 2016 11:28
-
-
Save margusmartsepp/077b7af171882b7b2293360da7876c45 to your computer and use it in GitHub Desktop.
Selenium acceptance test example
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
private static string _homepage = "http://rkr.devel.aedes.ee/"; | |
[Test] | |
[TestCase("xxxx?-*", "Teie otsingul ei olnud tulemusi.")] | |
public void ReadPivot(string searchItem, string expectedResult) | |
{ | |
using (var d = new ChromeDriver()) | |
{ | |
// Arrange | |
d.Navigate().GoToUrl(_homepage); | |
d.FindElement(By.Id("search")).SendKeys(searchItem); | |
d.FindElement(By.Id("search")).Submit(); | |
// Act | |
var result = By.Class("note-msg")).Text; | |
// Assert | |
Assert.That(result, Is.EqualTo(expectedResult)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment