CapybaraのSelenium::WebDriver::Error::

Everyday Rails - RSpecによるRailsテスト入門の2017年版の学習中にテストには通るがワーニングが出力された。

<h1>環境</h1>
<ul>
<li>Mac OS</li>
<li>Vagrant</li>
</ul>

<h1>出力</h1>
Everyday Rails - RSpecによるRailsテスト入門第６章

```
$ 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.
```

<h1>原因</h1>
capybaraが非推奨となっているメソッドを呼び出しているらしい。
<a href="https://github.com/teamcapybara/capybara/blob/master/History.md">CapybaraのGithub</a>

<h1>対処</h1>

CapybaraのバージョンをあげればOK!!!

```ruby:Gemfile
group :test do
  gem 'capybara', '~> 3.25.0' #←ここを変更
  gem 'webdrivers'
  gem 'launchy', '~> 2.4.3'
end
```

```
$ bundle install
```

以上です。