Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created February 12, 2017 16:05
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/f03d07ebbb3c225d7fc8406bda623bf7 to your computer and use it in GitHub Desktop.
Save angelovstanton/f03d07ebbb3c225d7fc8406bda623bf7 to your computer and use it in GitHub Desktop.
[TestClass]
public class AutomateThePlanetTest
{
private IWebDriver driver;
public TestContext TestContext { get; set; }
[TestInitialize]
public void SetupTest()
{
this.driver = new PhantomJSDriver();
this.driver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 30));
}
[TestCleanup]
public void TeardownTest()
{
this.driver.Quit();
}
[TestMethod]
public void TestInTheCloud()
{
var homePage = new HomePage(this.driver);
this.TestContext.BeginTimer("Automate The Planet Home Page- Navigate");
homePage.Navigate();
this.TestContext.EndTimer("Automate The Planet Home Page- Navigate");
homePage.AssertHeadline();
this.TestContext.BeginTimer("Automate The Planet- Go to Blog");
homePage.GoToBlog();
var blogPage = new BlogPage(this.driver);
blogPage.WaitForSubscribeWidget();
this.TestContext.EndTimer("Automate The Planet- Go to Blog");
blogPage.AssertTitle();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment