Skip to content

Instantly share code, notes, and snippets.

@ccschmitz
Last active June 1, 2018 14:07
Show Gist options
  • Save ccschmitz/419864d0a574369caef400a2f3d15bb1 to your computer and use it in GitHub Desktop.
Save ccschmitz/419864d0a574369caef400a2f3d15bb1 to your computer and use it in GitHub Desktop.
Capybara Selenium Chrome Extension Configuration
Rspec.configure do |config|
# ... all our other config ...
Capybara.register_driver :selenium_chrome do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_extension(Rails.root.join('spec', 'chrome_extensions', 'react-devtools.crx'))
options.add_extension(Rails.root.join('spec', 'chrome_extensions', 'redux-devtools.crx'))
chrome_options = {
browser: :chrome,
options: options
}
Capybara::Selenium::Driver.new(app, chrome_options)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment