java - How to add PhantomJSDriver command line arguments -
this question has answer here:
how can specify command line arguments java phantomjsdriver? example, want set --ignore-ssl-errors=yes
on script run.
simply add phantomjs's default desired capabilities, so:
desiredcapabilities desiredcapabilities = desiredcapabilities.phantomjs(); desiredcapabilities.setcapability("phantomjs.cli.args", collections.singletonlist("--ignore-ssl-errors=yes")); phantomjsdriver driver = new phantomjsdriver(desiredcapabilities);
Comments
Post a Comment