Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to use WebDriverManager with Junit 4
import io.github.bonigarcia.wdm.WebDriverManager;
//This method will run once before all of the tests in our class
public static void setupClass() {
//The setup() will run one time before every single @Test method
//In our case it will instantiate a new ChromeDriver that WebDriverManager setup for us
public void setup()
driver = new ChromeDriver();
//You need to add WebDriverManager dependency to your POM.xml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.