Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Last active February 15, 2016 07:08
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/ac4377cfb32c7fc4e233 to your computer and use it in GitHub Desktop.
Save angelovstanton/ac4377cfb32c7fc4e233 to your computer and use it in GitHub Desktop.
[TestMethod]
public void ExecuteInHeadlessBrowser()
{
this.driver = new PhantomJSDriver(
@"D:\Projects\PatternsInAutomation.Tests\WebDriver.Series.Tests\Drivers");
this.driver.Navigate().GoToUrl(@"http://automatetheplanet.com");
this.WaitUntilLoaded();
IJavaScriptExecutor js = driver as IJavaScriptExecutor;
string title = (string)js.ExecuteScript("return document.title");
Debug.WriteLine(title);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment