Skip to content

Commit c27a752

Browse files
authored
Merge pull request rails#43459 from sabulikia/fix-selenium-deprecation-warnings
Fix Selenium deprecation warnings in CI.
2 parents 9de32e0 + 0c9f35a commit c27a752

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ci/qunit-selenium-runner.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
require_relative "test_run"
55

66
driver = if ARGV[1]
7-
::Selenium::WebDriver.for(:remote, url: ARGV[1], desired_capabilities: :chrome)
7+
capability = ::Selenium::WebDriver::Remote::Capabilities.chrome
8+
9+
::Selenium::WebDriver.for(:remote, url: ARGV[1], capabilities: [capability])
810
else
911
driver_options = Selenium::WebDriver::Chrome::Options.new
1012
driver_options.add_argument("--headless")
1113
driver_options.add_argument("--disable-gpu")
1214
driver_options.add_argument("--no-sandbox")
1315

14-
::Selenium::WebDriver.for(:chrome, options: driver_options)
16+
::Selenium::WebDriver.for(:chrome, capabilities: [driver_options])
1517
end
1618

1719
driver.get(ARGV[0])

0 commit comments

Comments
 (0)