Skip to content

Commit

Permalink
Merge branch 'update-selenium-options' into webdrivers-gem
Browse files Browse the repository at this point in the history
  • Loading branch information
pablobm committed Dec 26, 2021
2 parents 076f243 + 81cb89e commit d4338c5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions spec/support/webdrivers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
end

Capybara.register_driver :headless_chrome do |app|
options = ::Selenium::WebDriver::Chrome::Options.new
options.headless!
options.add_argument "--window-size=1680,1050"

Capybara::Selenium::Driver.new(
app,
browser: :chrome,
options: options,
capabilities: Selenium::WebDriver::Remote::Capabilities.chrome(
"goog:chromeOptions" => {
"args" => [
"window-size=1680,1050",
"headless",
"disable-gpu",
"disable-dev-shm-usage",
],
},
),
)
end

Expand Down

0 comments on commit d4338c5

Please sign in to comment.