0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

macでChromeDriverの更新方法

Last updated at Posted at 2025-05-11

はじめに

railsでe2eテストをしていると、定期的にChromeDriverの更新が必要になるはず

❯ bin/rails test test/system/posts_test.rb        
2025-05-11 12:45:15 INFO Selenium [:logger_info] Details on how to use and modify Selenium logger:
  https://selenium.dev/documentation/webdriver/troubleshooting/logging

2025-05-11 12:45:15 WARN Selenium [:selenium_manager] The chromedriver version (101.0.4951.15) detected in PATH at /usr/local/bin/chromedriver might not be compatible with the detected chrome version (136.0.7103.93); currently, chromedriver 136.0.7103.92 is recommended for chrome 136.*, so it is advised to delete the driver in PATH and retry 
Running 4 tests in a single process (parallelization threshold is 50)
Run options: --seed 46376

参考

こちらを参考にやれば良いが、まとめる
https://qiita.com/kurokoya/items/d0f9783d4f6ac70ef581

やり方

こちらのページから、ChromeDriverをインストールして下さい。
https://developer.chrome.com/docs/chromedriver/downloads?hl=ja

インストールしたら、解凍して下さい

その後、既存のchromedriverは削除してokです
rm -rf /usr/local/bin/chromedriver

そして、インストールしたものに差し替えたらokです
chromedriverを/usr/local/binの下に移動させると、新しいものに切り替わって、最新のchromeに対して利用できるようになります

mv ~/Downloads/chrome-mac-arm64/* /usr/local/bin

❯ which chromedriver-path
/usr/local/bin/chromedriver-path

実行に成功

❯ bin/rails test test/system/posts_test.rb        
Running 4 tests in a single process (parallelization threshold is 50)
Run options: --seed 59733

# Running:

Capybara starting Puma...
* Version 6.6.0, codename: Return to Forever
* Min threads: 0, max threads: 4
* Listening on http://127.0.0.1:59374
....

Finished in 3.435979s, 1.1642 runs/s, 1.1642 assertions/s.
4 runs, 4 assertions, 0 failures, 0 errors, 0 skips
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?