Skip to content

Commit

Permalink
Set specific selenium-webdriver options for ruby > 3.2.
Browse files Browse the repository at this point in the history
On CI, require `selenium-webdriver` for Ruby > 3.2.
  • Loading branch information
Ruy Rocha committed Aug 23, 2023
1 parent 01e6c58 commit 42b4018
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ci/qunit-selenium-runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

if RUBY_VERSION < "3"
require "webdrivers"
elsif RUBY_VERSION > "3.2"
require "selenium-webdriver"
end
require_relative "test_run"

driver = if ARGV[1]
capability = ::Selenium::WebDriver::Remote::Capabilities.chrome
capability = if RUBY_VERSION > "3.2"
::Selenium::WebDriver::Options.chrome
else
::Selenium::WebDriver::Remote::Capabilities.chrome
end

::Selenium::WebDriver.for(:remote, url: ARGV[1], capabilities: [capability])
else
Expand Down

0 comments on commit 42b4018

Please sign in to comment.