Skip to content

Instantly share code, notes, and snippets.

@andreidbr
Created March 13, 2018 19:06
Show Gist options
  • Select an option

  • Save andreidbr/cd2a7dcca80536d6d954438d65f750d8 to your computer and use it in GitHub Desktop.

Select an option

Save andreidbr/cd2a7dcca80536d6d954438d65f750d8 to your computer and use it in GitHub Desktop.
An Utils class that instantiates a Webdriver object
package PortfolioTests.Utilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.concurrent.TimeUnit;
public final class Utils {
public static WebDriver driver;
private Utils() {
}
public static WebDriver instantiate() {
System.setProperty("webdriver.chrome.driver", "chromedriver.exe");
driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("https://andreidbr.github.io/JS30/");
return driver;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment