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

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -