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:
commit
c27a752a3b
1 changed files with 4 additions and 2 deletions
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue