5
1

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.

【Rails】WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecatedエラー

Posted at

Rspecにてテスト実行した際に、以下エラーが発生しました。

$ bundle exec rspec spec/system/posts.rb
 >WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.

エラー文を確認すると、Chromedriverは非推奨(deprecated)なので、代わりに(instead)WebDriverを使ってくださいといった内容のことが書かれています。

という訳で早速切り替えていきます。

Gemfile
group :test do
  gem 'chromedriver-helper'
end

これを、以下に変えます。

Gemfile
group :test do
  gem 'webdrivers'
end

完了後は、$ bundleにて修正を反映させれば完了です。

5
1
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
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?