Skip to content

Commit 8692def

Browse files
committed
Upgrade to selenium-webdriver 4
1 parent 6141baf commit 8692def

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

tests/Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ ruby '2.7.4'
55
gem 'capybara', '~> 3.35'
66
gem 'rspec', '~> 3.10'
77
gem 'capybara-screenshot', '~> 1.0'
8-
gem 'selenium-webdriver', '~> 3.142'
9-
gem 'webdrivers', '~> 4.6'
8+
gem 'selenium-webdriver', '~> 4.0'
9+
gem 'webdrivers', '~> 5.0'

tests/Gemfile.lock

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GEM
1515
capybara-screenshot (1.0.25)
1616
capybara (>= 1.0, < 4)
1717
launchy
18-
childprocess (3.0.0)
18+
childprocess (4.1.0)
1919
diff-lcs (1.4.4)
2020
launchy (2.5.0)
2121
addressable (~> 2.7)
@@ -31,6 +31,7 @@ GEM
3131
rack-test (1.1.0)
3232
rack (>= 1.0, < 3)
3333
regexp_parser (2.1.1)
34+
rexml (3.2.5)
3435
rspec (3.10.0)
3536
rspec-core (~> 3.10.0)
3637
rspec-expectations (~> 3.10.0)
@@ -45,13 +46,14 @@ GEM
4546
rspec-support (~> 3.10.0)
4647
rspec-support (3.10.3)
4748
rubyzip (2.3.2)
48-
selenium-webdriver (3.142.7)
49-
childprocess (>= 0.5, < 4.0)
49+
selenium-webdriver (4.0.3)
50+
childprocess (>= 0.5, < 5.0)
51+
rexml (~> 3.2, >= 3.2.5)
5052
rubyzip (>= 1.2.2)
51-
webdrivers (4.7.0)
53+
webdrivers (5.0.0)
5254
nokogiri (~> 1.6)
5355
rubyzip (>= 1.3.0)
54-
selenium-webdriver (> 3.141, < 5.0)
56+
selenium-webdriver (~> 4.0)
5557
xpath (3.2.0)
5658
nokogiri (~> 1.8)
5759

@@ -62,8 +64,8 @@ DEPENDENCIES
6264
capybara (~> 3.35)
6365
capybara-screenshot (~> 1.0)
6466
rspec (~> 3.10)
65-
selenium-webdriver (~> 3.142)
66-
webdrivers (~> 4.6)
67+
selenium-webdriver (~> 4.0)
68+
webdrivers (~> 5.0)
6769

6870
RUBY VERSION
6971
ruby 2.7.4p191

tests/spec/spec_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
options = {}
4343
options[:log_level] = :trace if capture_js_log
4444

45-
browser_options = ::Selenium::WebDriver::Firefox::Options.new(options)
45+
browser_options = ::Selenium::WebDriver::Firefox::Options.new(**options)
4646
browser_options.headless! if ENV.fetch('HEADLESS', 'true').casecmp?('true')
4747
browser_options.add_preference('devtools.console.stdout.content', true) if capture_js_log
4848

4949
Capybara::Selenium::Driver.new(
5050
app,
5151
browser: :firefox,
52-
options: browser_options,
52+
capabilities: browser_options,
5353
clear_local_storage: true,
5454
clear_session_storage: true,
5555
)

0 commit comments

Comments
 (0)