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?

More than 1 year has passed since last update.

SeleniumのChromeDriverに関するエラーを解決

Last updated at Posted at 2023-12-12

はじめに

SeleniumのChromeDriverのエラーで解決に少し時間がかかったので備忘録として残します。

問題と解決方法

  1. そもそもChromeDriverがインストールされていない
    エラー:WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
    以下のURLに案内されます。Selenium 4.6を使っていれば何もしなくてもよいようなのですが、エラーが改善されなかったので、マニュアルでDriverをダウンロードして環境変数を通します。
    https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
  2. Chromeのバージョンとドライバーのバージョンの互換性がない
    エラー:SessionNotCreatedException
    ドライバーをダウンロードしたと思ったら互換性エラーが発生。最新版のChromeを使っている場合は以下のURLからDriverをダウンロードしなければならなかったようです。
    https://googlechromelabs.github.io/chrome-for-testing/

おわりに

マニュアルをちゃんと読めばすぐに解決するところ、それっぽいで選んでしまい互換性エラーでさらに時間かかりました。同じように躓いた方の助けになれば幸いです。

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?