Created
August 15, 2014 03:57
-
-
Save rcasady616/b2488e72d062c95dc97b to your computer and use it in GitHub Desktop.
Ensure that WebDriver is disposed after each test even if the test fails
This file contains 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
public IWebDriver Driver; | |
[SetUp] | |
public void SetupTest() | |
{ | |
Driver = WebDriverFactory.GetSauceDriver(); | |
} | |
[TearDown] | |
public void TearDown() | |
{ | |
if (Driver != null) | |
Driver.Quit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment