Method: Quke::DriverConfiguration#phantomjs
- Defined in:
- lib/quke/driver_configuration.rb
#phantomjs ⇒ Object
Returns an array used as part of the poltergeist settings, which are passed in when initialising a Capybara::Poltergeist::Driver.
For example when initialising the driver like this
Capybara::Poltergeist::Driver.new(app,
{
js_errors: true,
timeout: 30,
debug: false,
phantomjs_options: [
'--load-images=no',
'--disk-cache=false',
'--ignore-ssl-errors=yes',
'--proxy=10.10.2.70:8080'
],
inspector: true
}
)
Rather than setting the phantomjs_options: manually Quke::DriverConfiguration.phantomjs is intended to manage what they should be based on the properties of the Quke::Configuration instance its initialised with
Capybara::Poltergeist::Driver.new(app,
{
js_errors: true,
timeout: 30,
debug: false,
phantomjs_options: my_driver_config.phantomjs,
inspector: true
}
)
103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/quke/driver_configuration.rb', line 103 def phantomjs # For future reference the options we pass through to phantomjs appear to # mirror those you can actually supply on the command line. # http://phantomjs.org/api/command-line.html = [ '--load-images=no', '--disk-cache=false', '--ignore-ssl-errors=yes' ] .push("--proxy=#{config.proxy['host']}:#{config.proxy['port']}") if config.use_proxy? end |