public class FooTest {
WebDriver driver;
@Before
public void beforeTest() {
DesiredCapabilities capabilities = new DesiredCapabilities();
ca
PhantomJSDriver does not support (all) DesiredCapabilities.
You will need:
caps = new DesiredCapabilities();
caps.setJavascriptEnabled(true);
caps.setCapability(PhantomJSDriverService.PHANTOMJS_CLI_ARGS, new String[] {"--web-security=no", "--ignore-ssl-errors=yes"});
driver = new PhantomJSDriver(caps);
Documented here: https://github.com/detro/ghostdriver/issues/233