New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options for poltergeist #61

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

Comments

Projects
None yet
4 participants
@lencioni
Contributor

lencioni commented Jul 25, 2014

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

This comment has been minimized.

Show comment
Hide comment
@ronwsmith

ronwsmith Jul 26, 2014

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
Collaborator

ronwsmith commented Jul 26, 2014

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

This comment has been minimized.

Show comment
Hide comment
@trotzig

trotzig 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.

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

This comment has been minimized.

Show comment
Hide comment
@tansaku

tansaku Feb 2, 2016

Contributor

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

Error: Unknown option: js_errors

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

This comment has been minimized.

Show comment
Hide comment
@ronwsmith

ronwsmith Feb 2, 2016

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
Collaborator

ronwsmith commented Feb 2, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@tansaku

tansaku Feb 2, 2016

Contributor

@ronwsmith - much appreciated

Contributor

tansaku commented Feb 2, 2016

@ronwsmith - much appreciated

@trotzig

This comment has been minimized.

Show comment
Hide comment
@trotzig

trotzig 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. :)

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