Created
January 10, 2012 06:47
-
-
Save creswick/1587495 to your computer and use it in GitHub Desktop.
ChromeDriver causes stack overflow if you specify the path to chrome via ChromeOptions
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
import java.io.File; | |
import java.io.IOException; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.chrome.ChromeOptions; | |
public class WebTest { | |
public static void main(String[] args) throws IOException { | |
// relative path to chrome driver binary: | |
String chromeDriverPth = "./src/main/resources/seleniumDrivers/linux64/chromedriver"; | |
System.setProperty("webdriver.chrome.driver", chromeDriverPth); | |
// set chrome options with path to google-chrome binary: | |
ChromeOptions options = new ChromeOptions(); | |
options.setBinary(new File("/usr/bin/google-chrome")); | |
// create the chrome driver: | |
WebDriver driver = new ChromeDriver(options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment