Created
August 11, 2021 21:18
-
-
Save executeautomation/738667105b45f7b1fe86feaa3a7667ba 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 XUnitDemo | |
{ | |
/// <summary> | |
/// WebDriverFixture code for XUnit to handle | |
/// Selenium WebDriver | |
/// </summary> | |
public class WebDriverFixture : IDisposable | |
{ | |
public ChromeDriver ChromeDriver { get; private set; } | |
public WebDriverFixture() | |
{ | |
//WebDriverManager | |
var driver = new DriverManager().SetUpDriver(new ChromeConfig()); | |
ChromeDriver = new ChromeDriver(); | |
} | |
public void Dispose() | |
{ | |
ChromeDriver.Quit(); | |
ChromeDriver.Dispose(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment