throw new IllegalArgumentException("Invalid " + PHANTOMJS_CLI_ARGS + ": " + cliArgs);
}
cliArgs = ArrayUtils.addAll((String[]) cliArgs, driverOptions.getCliArgs());
caps.setCapability(PHANTOMJS_CLI_ARGS, cliArgs);
}
PhantomJSDriverService service = CustomPhantomJSDriverServiceFactory.createDefaultService(caps);
PhantomJSDriver driver = new PhantomJSDriver(service, caps);
setInitialWindowSize(driver, driverOptions);
return driver;
}