Everyday Rails - RSpecによるRailsテスト入門の2017年版の学習中にテストには通るがワーニングが出力された。
環境
- Mac OS
- Vagrant
出力
Everyday Rails - RSpecによるRailsテスト入門第6章$ bin/rspec spec/features/tasks_spec.rb
上記のコマンドを入力
Tasks
2020-12-30 23:02:22 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::UnhandledError is deprecated. Use Selenium::WebDriver::Error::UnknownError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:22 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotVisibleError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:22 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::InvalidElementStateError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:22 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotSelectableError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::UnhandledError is deprecated. Use Selenium::WebDriver::Error::UnknownError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotVisibleError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::InvalidElementStateError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotSelectableError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::UnhandledError is deprecated. Use Selenium::WebDriver::Error::UnknownError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotVisibleError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::InvalidElementStateError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotSelectableError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::UnhandledError is deprecated. Use Selenium::WebDriver::Error::UnknownError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotVisibleError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::InvalidElementStateError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:23 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotSelectableError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:24 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::UnhandledError is deprecated. Use Selenium::WebDriver::Error::UnknownError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:24 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotVisibleError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:24 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::InvalidElementStateError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
2020-12-30 23:02:24 WARN Selenium [DEPRECATION] Selenium::WebDriver::Error::ElementNotSelectableError is deprecated. Use Selenium::WebDriver::Error::ElementNotInteractableError (ensure the driver supports W3C WebDriver specification) instead.
原因
capybaraが非推奨となっているメソッドを呼び出しているらしい。 CapybaraのGithub対処
CapybaraのバージョンをあげればOK!!!
Gemfile
group :test do
gem 'capybara', '~> 3.25.0' #←ここを変更
gem 'webdrivers'
gem 'launchy', '~> 2.4.3'
end
$ bundle install
以上です。