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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -