标题说明了一切,我目前正在尝试将 PhantomJS 与 Eclipse 一起使用并且它可以工作,但是我不知道如何更改 PhantomJS 的自定义页面设置的设置,我需要帮助。谢谢
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;