Options for poltergeist #61

Open
lencioni opened this Issue Jul 25, 2014 · 6 comments

Projects

None yet

4 participants

@lencioni
Contributor

I would like to use puffing billy with poltergeist, but with the js_errors option turned on. It would be nice if there was a way for me to set some options that are passed through to poltergeist in the register_drivers call.

The list of poltergeist options can be found at: https://github.com/teampoltergeist/poltergeist#customization

@ronwsmith
Collaborator

You can create your own driver until this feature is implemented. Something along the lines of:

      Capybara.register_driver :pg_billy do |app|
        options = {
          phantomjs_options: [
            '--ignore-ssl-errors=yes',
            '--js_errors=yes',
            "--proxy=#{Billy.proxy.host}:#{Billy.proxy.port}"
          ]
        }
        Capybara::Poltergeist::Driver.new(app, options)
      end
@trotzig
trotzig commented Jul 28, 2014

Thanks @rownsmith. That is what we're currently doing, but it would be nice to avoid all of that with just a config option.

@tansaku
Contributor
tansaku commented Feb 2, 2016

@trotzig - any chance you could share your precise config? I'm trying to use @ronwsmith's above but get:

Error: Unknown option: js_errors

@ronwsmith
Collaborator

@tansaku, this is my current config:

   Capybara.register_driver :pg_billy do |app|
     options = {
       js_errors: false,
       phantomjs_options: [
         '--ignore-ssl-errors=yes',
         "--proxy=#{Billy.proxy.host}:#{Billy.proxy.port}"
       ]
     }
     Capybara::Poltergeist::Driver.new(app, options)
   end
@tansaku
Contributor
tansaku commented Feb 2, 2016

@ronwsmith - much appreciated

@trotzig
trotzig commented Feb 2, 2016

@tansaku it looks like you were helped above. I had a quick look at our current configuration, and it looks like we no longer register a custom driver. I could do some digging in our git log but I'd prefer not to. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment