如何在Eclipse IDE中为PhantomJS设置页面设​​置

时间:2015-05-22 03:01:02

标签: eclipse ide phantomjs driver ghost

标题说明了一切,我目前正在尝试将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;

0 个答案:

没有答案