0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【RSpec】WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated.の対処策

Posted at

警告内容

こんにちは!
RSpecの学習を進めていく中で、下記の警告文が表示されたので、気になって調べました。
WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.

deprecatedは日本語で非推奨という意味なので、
Selenium::WebDriver::Chrome#driver_path=
は非推奨であり、
Selenium::WebDriver::Chrome::Service#driver_path=
を使用した方がいいですよという内容ですね。

毎回動かす中で警告文が出てしまうのが気に障ったりすると思いますので、下記で対処しちゃいましょう!

対処法

Gemfile
-  gem 'chromedriver-helper'
+  gem 'webdrivers', '~> 4.0'

これで対処できるはずです!
ちなみにwebdriversの3.0は恐らくzipファイルがないためエラー表示がされてしまいます。

一度警告文が出てしまった時はこちらで対応しましょう!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?