I need to test with selenium chrome driver in Java. But chrome window should\'t be opened. Assume this a product and no window should be opened.
I\'ve also looked at
I like this article.
Basically you need to add PhantomJS dependency in pom (I like maven for dependency management):
com.github.detro.ghostdriver
phantomjsdriver
1.1.0
And run code
System.setProperty( "phantomjs.binary.path", "c:\\path\\to\\phantomjs-1.9.8-windows\\phantomjs.exe" );
WebDriver driver = new PhantomJSDriver();
driver.get("http://www.google.com");
driver.quit();
It worked for me with versions: