Last active
June 1, 2018 14:07
-
-
Save ccschmitz/419864d0a574369caef400a2f3d15bb1 to your computer and use it in GitHub Desktop.
Capybara Selenium Chrome Extension Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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