1
0

More than 1 year has passed since last update.

bundle exec rspec実行時にSelenium::WebDriver::Chrome#driver_path= is deprecated.〜 エラーが発生した

Last updated at Posted at 2022-02-23

bundle exec rspec実行時のエラー解決備忘録

エラー内容

  • RSpecでテストを実行した際に、下記エラーが発生した。
$ bundle exec rspec2022-02-23 18:27:19 WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.

解決方法

  • Gemfileの記載内容を修正
  • gem 'chromedriver-helper' を削除
  • gem 'webdrivers' を追加し、bundle installを実行
  • 再度bundle rspec test を実行し、無事テストが走った
group :test do
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '>= 2.15'
  gem 'selenium-webdriver'
  gem 'webdrivers'
end

所感

そもそも、WebDriverとは何かを知らなかったため、今回のエラーで新たな知識を得られる良い機会だったなと実感した。。。

参考

1
0
1

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