-
-
Save AndyDaSilva52/6088679 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
namespace SeleniumTest | |
{ | |
[TestFixture(typeof(FirefoxDriver))] | |
[TestFixture(typeof(InternetExplorerDriver))] | |
public class BlogTest<TWebDriver> where TWebDriver : IWebDriver, new() | |
{ | |
private IWebDriver _driver; | |
[Test] | |
public void SearchResults_ShouldHaveCorrectPageTitle() | |
{ | |
_driver = new TWebDriver(); | |
// Navigate | |
_driver.Navigate().GoToUrl("http://www.deanhume.com"); | |
IWebElement searchBox = _driver.FindElement(By.Name("searchValue")); | |
searchBox.SendKeys("moq"); | |
searchBox.Submit(); | |
Assert.AreEqual("Dean Hume - Search Results - moq", _driver.Title); | |
} | |
[TestFixtureTearDown] | |
public void FixtureTearDown() | |
{ | |
if (_driver != null) _driver.Close(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment