定期的にタイトルのエラーが発生するのですが、いつも苦労して気がついたら治ってて。。。。
みたいなことの連続なので、今回はメモとして残してみました

根本の問題

そのままでchrome driverのversionがあっていない、が問題です

ただ、個人的に気になったのは、

brew uninstall chromedriver

しても、なぜか、タイトルのエラーが発生してどうやらbrew経由でinstallしたchrome driverとは関係なさそうな感じ。。。

解決策

ググってみたらこんな記事発見

RSpecでchromedriverとChromeのバージョンが合わない

chromedriver-helperと言うgemがサポート終了しても入っていると、それが原因でversion違いが起こってるのでは?と言うことが書いてありました

なのでこちらを実行

gem list

....
chromedriver-helper (2.1.1)
...

なんと入ってました!!!!

なので、こちらをdeleteします
※ちなみにGemfileにも入っていたのでコメントアウトしました🙌

gem uninstall chromedriver-helper

その後、rspec走らせたら動きました!!!!!!!!

Registrations
  User
    password correct
2022-01-17 23:44:44 WARN Selenium [DEPRECATION] [:browser_options] :options as a parameter for driver initialization is deprecated. Use :capabilities with an Array of value capabilities/options if necessary instead.
      succeeds

Top 1 slowest examples (32.77 seconds, 100.0% of total time):
  Registrations User password correct succeeds
    32.77 seconds ./spec/system/users/registrations_system_spec.rb:12

Finished in 32.78 seconds (files took 2.74 seconds to load)
1 example, 0 failures

Randomized with seed 30581

Coverage report generated for RSpec to /Users/masahirookubo/client/world_alive/driver_app/coverage. 210 / 867 LOC (24.22%) covered.

コメントをどうぞ

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

CAPTCHA