标题说明了一切,我目前正在尝试将PhantomJS与Eclipse配合使用,但是我不知道如何更改PhantomJS自定义页面设置的设置,我希望帮助它。 Thankss
DesiredCapabilities dcaps = new DesiredCapabilities();
dcaps.setCapability(
PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
phantomjs.getAbsolutePath());
dcaps.setCapability("takesScreenshot", true);
dcaps.setJavascriptEnabled(true);
dcaps.setCapability(PhantomJSDriverService.PHANTOMJS_CLI_ARGS,
new String[] { "--web-security=yes", "--ssl-protocol=any",
"--ignore-ssl-errors=yes",
"--local-to-remote-url-access=true",
"--disk-cache=true"});
PhantomJSDriver phantomdriver = new PhantomJSDriver(dcaps);
phantomdriver.get(someURL);
driver = phantomdriver;