This article is the previous article [Ruby on Rails] I get a warning when executing RSpec due to a different gem version. This is a continuation of, but since it was a completely different warning, I divided it into two.
2020.10.10 In the comments, I pointed out the difference in my interpretation, so I corrected that point.
Ruby 2.5.7 Rails 5.2.4
gem gem 'rspec-rails', '~> 3.6'
When I wrote the test code using RSpec and executed it, the following warning message appeared.
$ rspec spec/models/tag_spec.rb
2020-10-09 09:13:13 WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.
This isn't an error, so the test runs fine, but I can't afford to leave it out every time, so I'll fix it as well.
The content of the warning text,
Selenium::WebDriver::Chrome#driver_path= is deprecated.
Because the driver_path =
method of the Chrome class is deprecated
Selenium::WebDriver::Chrome::Service#driver_path= instead.
The message is to use the driver_path =
method of the Service class instead.
As written here, my Gemfile also had a gem'chromedriver-helper'
, so I'll remove it first.
Next alternative
Write gem'webdrivers'
.
Finally
$ bundle install
I was able to solve it with.
If you have any questions, differences in interpretation, or discomfort in the description method, we would appreciate it if you could point them out in the comments.
Thank you for reading until the end.
I have published the files I actually use on my GitHub, so I hope you can refer to that as well! GitHub - MasaoSasaki/matchi
Other Qiita --Procedure for migrating from unsupported chromedriver-helper to webdrivers gem Qiita --What's new in rspec-rails 3.7! I tried using System Spec