Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `path' for class Selenium::WebDriver::DriverFinder (NoMethodError) with selenium-webdriver 4.20.0 #51658

Closed
yahonda opened this issue Apr 25, 2024 · 4 comments · Fixed by #51662

Comments

@yahonda
Copy link
Member

yahonda commented Apr 25, 2024

Managed to reproduce CI failure at https://buildkite.com/rails/rails-nightly/builds/457#018f128f-00fe-4598-b07a-73c67fb56e44/1136-1138 .

Steps to reproduce

git clone https://github.com/rails/rails
cd rails
bundle update selenium-webdriver --conservative
cd actionpack
git diff # to show the selenium-webdriver version
bin/test

Expected behavior

It should pass.

Actual behavior

It raises "undefined method `path' for class Selenium::WebDriver::DriverFinder (NoMethodError)".

$ git diff
diff --git a/Gemfile.lock b/Gemfile.lock
index 82be41de68..081a26d484 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -491,7 +491,8 @@ GEM
       google-protobuf (~> 3.25)
     sass-embedded (1.69.6-x86_64-linux-gnu)
       google-protobuf (~> 3.25)
-    selenium-webdriver (4.16.0)
+    selenium-webdriver (4.20.0)
+      base64 (~> 0.2)
       rexml (~> 3.2, >= 3.2.5)
       rubyzip (>= 1.2.2, < 3.0)
       websocket (~> 1.0)
$
$ bin/test
/home/yahonda/src/github.com/rails/rails/actionpack/lib/action_dispatch/system_testing/browser.rb:75:in `resolve_driver_path': undefined method `path' for class Selenium::WebDriver::DriverFinder (NoMethodError)

          namespace::Service.driver_path = ::Selenium::WebDriver::DriverFinder.path(options, namespace::Service)
                                                                              ^^^^^
	from /home/yahonda/src/github.com/rails/rails/actionpack/lib/action_dispatch/system_testing/browser.rb:45:in `preload'
	from /home/yahonda/src/github.com/rails/rails/actionpack/lib/action_dispatch/system_testing/driver.rb:21:in `initialize'
	from /home/yahonda/src/github.com/rails/rails/actionpack/lib/action_dispatch/system_test_case.rb:161:in `new'
	from /home/yahonda/src/github.com/rails/rails/actionpack/lib/action_dispatch/system_test_case.rb:161:in `driven_by'
	from /home/yahonda/src/github.com/rails/rails/actionpack/test/abstract_unit.rb:519:in `<class:DrivenBySeleniumWithChrome>'
	from /home/yahonda/src/github.com/rails/rails/actionpack/test/abstract_unit.rb:518:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/yahonda/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/yahonda/src/github.com/rails/rails/actionpack/test/abstract/callbacks_test.rb:3:in `<top (required)>'
	from /home/yahonda/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `require'
	from /home/yahonda/.rbenv/versions/3.3.1/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
	from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:61:in `block in load_tests'
	from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:60:in `each'
	from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:60:in `load_tests'
	from /home/yahonda/src/github.com/rails/rails/railties/lib/rails/test_unit/runner.rb:52:in `run'
	from /home/yahonda/src/github.com/rails/rails/tools/test.rb:18:in `<top (required)>'
	from bin/test:5:in `require_relative'
	from bin/test:5:in `<main>'
$

System configuration

Rails version: main branch

Ruby version: ruby 3.3.1 (2024-04-23 revision c56cd86388) [x86_64-linux]

@yahonda yahonda changed the title undefined method path' for class Selenium::WebDriver::DriverFinder (NoMethodError) with selenium-webdriver` 4.20.0 undefined method `path' for class Selenium::WebDriver::DriverFinder (NoMethodError) with selenium-webdriver 4.20.0 Apr 25, 2024
@Earlopain
Copy link
Contributor

I asked if this is an intentional change since the PR description made it sound like it should be deprecated instead: SeleniumHQ/selenium#13386 (comment)

p0deje added a commit to SeleniumHQ/selenium that referenced this issue Apr 25, 2024
This was accidentally removed in #13386.
Fixes #13876.
Related to rails/rails#51658.
p0deje added a commit to SeleniumHQ/selenium that referenced this issue Apr 25, 2024
This was accidentally removed in #13386.
Fixes #13876.
Related to rails/rails#51658.
p0deje added a commit to SeleniumHQ/selenium that referenced this issue Apr 25, 2024
This was accidentally removed in #13386.
Fixes #13876.
Related to rails/rails#51658.
@yahonda
Copy link
Member Author

yahonda commented Apr 25, 2024

Let's see how SeleniumHQ/selenium#13877 goes. In the meantime let's pin the selenium-webdriver version to 4.19.0 .

yahonda added a commit to yahonda/rails that referenced this issue Apr 25, 2024
This commit pins the selenium-webdriver` version to 4.19
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
This commit can be reverted once the newer version of `selenium-webdriver` that includes SeleniumHQ/selenium#13877 .

Fix rails#51658
@yahonda
Copy link
Member Author

yahonda commented Apr 25, 2024

Opened #51662 to pin the selenium-webdriver version .
Feel free to open a pull request to support the newer versions of selenium-webdriver that deprecates Selenium::WebDriver::DriverFinder.path.

yahonda added a commit to yahonda/rails that referenced this issue Apr 26, 2024
This commit will not install the selenium-webdriver` version 4.20.0
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
It will be restored once the newer version of `selenium-webdriver` that includes SeleniumHQ/selenium#13877 .

Fix rails#51658
yahonda added a commit to yahonda/rails that referenced this issue Apr 26, 2024
This commit will not install the selenium-webdriver` version 4.20.0
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
It will be restored once the newer version of `selenium-webdriver` that includes SeleniumHQ/selenium#13877 .

Fix rails#51658
p0deje added a commit to SeleniumHQ/selenium that referenced this issue Apr 26, 2024
This was accidentally removed in #13386.
Fixes #13876.
Related to rails/rails#51658.
@p0deje
Copy link

p0deje commented Apr 26, 2024

This was accidentally removed API that should have been deprecated instead. Sorry, should be fixed in 4.20.1.

fractaledmind pushed a commit to fractaledmind/rails that referenced this issue May 13, 2024
This commit will not install the selenium-webdriver` version 4.20.0
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
It will be restored once the newer version of `selenium-webdriver` that includes SeleniumHQ/selenium#13877 .

Fix rails#51658
xjunior pushed a commit to xjunior/rails that referenced this issue Jun 9, 2024
This commit will not install the selenium-webdriver` version 4.20.0
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
It will be restored once the newer version of `selenium-webdriver` that includes SeleniumHQ/selenium#13877 .

Fix rails#51658
jianbo pushed a commit to jianbo/setter-with-association that referenced this issue Jul 8, 2024
This commit will not install the selenium-webdriver` version 4.20.0
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
It will be restored once the newer version of `selenium-webdriver` that includes SeleniumHQ/selenium#13877 .

Fix rails#51658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants