Created
March 3, 2020 15:36
-
-
Save NickBaynham/ee2820e09a1e67e5aa69c8e273136f40 to your computer and use it in GitHub Desktop.
Registration Base Test
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
package selfHealingExamples.tests.registration; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.annotations.AfterMethod; | |
import org.testng.annotations.BeforeMethod; | |
public class BaseTest { | |
@BeforeMethod | |
public void setup() { | |
System.setProperty("webdriver.chrome.driver", "/Selenium/chromedriver"); | |
driver.set(new ChromeDriver()); | |
} | |
@AfterMethod | |
public void wrapUp() { | |
if (driver.get() != null) { | |
driver.get().quit(); | |
} | |
} | |
WebDriver getDriver() { | |
return driver.get(); | |
} | |
ThreadLocal<WebDriver> driver = new ThreadLocal<WebDriver>(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment