0

The title says it all, I am currently trying to use PhantomJS with Eclipse and it works, but however I don't know how I can change the settings for PhantomJS's custom page settings and I would like help with it. 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;
Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
Calvin
  • 39
  • 1
  • 8

0 Answers0