Skip to content

Commit

Permalink
capabilities (#26)
Browse files Browse the repository at this point in the history
Co-authored-by: Pavel Rosický <pavel.rosicky@easy.cz>
  • Loading branch information
ahorek and ahorek authored Oct 6, 2021
1 parent 8f6265c commit c9c648b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- pass chrome_options as capabilities

### Added
- shoulda-matchers support

Expand Down
4 changes: 2 additions & 2 deletions spec/init_capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def suppress?(message)

Capybara.register_driver :chrome do |app|
chrome_options = Selenium::WebDriver::Chrome::Options.new(args: CHROME_OPTIONS)
Capybara::Selenium::Driver.new(app, browser: :chrome, options: chrome_options)
Capybara::Selenium::Driver.new(app, browser: :chrome, capabilities: chrome_options)
end

Capybara.register_driver :chrome_headless do |app|
Expand All @@ -37,7 +37,7 @@ def suppress?(message)
args << "window-size=#{RESOLUTION.join(',')}"

chrome_options = Selenium::WebDriver::Chrome::Options.new(args: args)
Capybara::Selenium::Driver.new(app, browser: :chrome, options: chrome_options)
Capybara::Selenium::Driver.new(app, browser: :chrome, capabilities: chrome_options)
end

Capybara.javascript_driver = JS_DRIVER

0 comments on commit c9c648b

Please sign in to comment.