Skip to content

Commit

Permalink
Pass options object
Browse files Browse the repository at this point in the history
  • Loading branch information
aapomm committed Feb 13, 2024
1 parent 29b1750 commit 1a830ea
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,19 @@

Capybara.register_driver :chrome do |app|
options = %w[headless disable-gpu window-size=1920,1080]
driver_options = Selenium::WebDriver::Chrome::Options.new(
args: options
)

if ENV['REMOTE_DRIVER']
Selenium::WebDriver.for :remote, options: options, url: ENV['REMOTE_DRIVER']
Selenium::WebDriver.for :remote, url: ENV['REMOTE_DRIVER'], options: driver_options
else
Capybara::Selenium::Driver.new(
app,
browser: :chrome,
timeout: 120,
clear_local_storage: true,
options: Selenium::WebDriver::Chrome::Options.new(
args: options
)
options: driver_options
)
end
end
Expand Down

0 comments on commit 1a830ea

Please sign in to comment.