Created
May 24, 2017 16:54
-
-
Save angelovstanton/841fd5ff9fa75a231967a4165ca3fc3b 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
[TestClass] | |
public class BingTests | |
{ | |
private IWebDriver _driver; | |
[TestInitialize] | |
public void SetupTest() | |
{ | |
_driver = new FirefoxDriver(); | |
_driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30); | |
} | |
[TestCleanup] | |
public void TeardownTest() | |
{ | |
_driver.Quit(); | |
} | |
[TestMethod] | |
public void SearchTextInBing_First() | |
{ | |
var bingMainPage = new BingMainPage(_driver); | |
bingMainPage.Navigate(); | |
bingMainPage.Search("Automate The Planet"); | |
bingMainPage.AssertResultsCount("236,000 RESULTS"); | |
} | |
[TestMethod] | |
public void SearchTextInBing_UseElementsDirectly() | |
{ | |
var bingMainPage = new BingMainPage(_driver); | |
bingMainPage.Navigate(); | |
bingMainPage.SearchBox = "Automate The Planet"; | |
bingMainPage.GoButton.Click(); | |
Assert.AreEqual(bingMainPage.ResultsCountDiv, "236,000 RESULTS"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment