Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created July 9, 2015 19:58
Show Gist options
  • Save angelovstanton/9381a10a8b84477a3e12 to your computer and use it in GitHub Desktop.
Save angelovstanton/9381a10a8b84477a3e12 to your computer and use it in GitHub Desktop.
public class WebDriverRedirectStrategy : IRedirectStrategy
{
private IWebDriver driver;
public void Initialize()
{
this.driver = new FirefoxDriver();
}
public void Dispose()
{
this.driver.Quit();
}
public string NavigateToFromUrl(string fromUrl)
{
this.driver.Navigate().GoToUrl(fromUrl);
string currentSitesUrl = this.driver.Url;
return currentSitesUrl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment