1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #43459 from sabulikia/fix-selenium-deprecation-warnings

Fix Selenium deprecation warnings in CI.
This commit is contained in:
Rafael Mendonça França 2021-10-14 12:36:45 -04:00 committed by GitHub
commit c27a752a3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,14 +4,16 @@ require "webdrivers"
require_relative "test_run"
driver = if ARGV[1]
::Selenium::WebDriver.for(:remote, url: ARGV[1], desired_capabilities: :chrome)
capability = ::Selenium::WebDriver::Remote::Capabilities.chrome
::Selenium::WebDriver.for(:remote, url: ARGV[1], capabilities: [capability])
else
driver_options = Selenium::WebDriver::Chrome::Options.new
driver_options.add_argument("--headless")
driver_options.add_argument("--disable-gpu")
driver_options.add_argument("--no-sandbox")
::Selenium::WebDriver.for(:chrome, options: driver_options)
::Selenium::WebDriver.for(:chrome, capabilities: [driver_options])
end
driver.get(ARGV[0])