When running plain PhantomJS a config.json can be set which sets some options. How I can setup PhantomJS with JSON file when using the Selenium WebDriver?
I have this:
DesiredCapabilities caps = new DesiredCapabilities();
caps.setJavascriptEnabled(true);
caps.setCapability("takesScreenshot", false);
caps.setCapability(
PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
"/usr/local/bin/phantomjs");
driver = new PhantomJSDriver(caps);