Skip to content
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

Adds a configurable Cuprite driver #327

Merged
merged 1 commit into from Aug 7, 2022

Conversation

zedtux
Copy link
Contributor

@zedtux zedtux commented Jul 1, 2022

This PR adds support for a configurable Cuprite driver.

What I mean is that it allows passing additional flags to the driver like that :

# Some code here to build the `remote_chrome` variable and the `REMOTE_CHROME_URL` constant.

remote_options = remote_chrome ? { url: REMOTE_CHROME_URL } : {}

Billy.configure do |c|
  c.cuprite_options = {
    browser_options: remote_chrome ? { 'no-sandbox' => nil } : {},
    inspector: true,
    js_errors: true,
    # See features/support/download_helpers.rb
    save_path: File.join(Capybara.save_path, 'downloads'),
    window_size: [810, 1080]
  }.merge(remote_options)

  c.cache = true
  # ...
end

require 'billy/capybara/cucumber'

Capybara.default_driver =
    Capybara.javascript_driver =
      Capybara.current_driver = :cuprite_billy

This PR also update the README.md file in order to explain how to configure a remote Chrome with nice tip about ActionCable taken from #252.

@ronwsmith ronwsmith merged commit 93cf7cf into oesmith:master Aug 7, 2022
@ronwsmith
Copy link
Collaborator

Released in 3.0.4. Thanks for the contribution!

@zedtux
Copy link
Contributor Author

zedtux commented Aug 8, 2022

Thank you !

@zedtux zedtux deleted the drivers/cuprite branch December 15, 2022 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants