LoginSignup
0
0

SeleniumのChromeDriverバージョンエラー

Last updated at Posted at 2023-09-06

課題

Seleniumを利用していたら次のエラーが発生するようになりました。

selenium.common.exceptions.SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 114. LATEST_RELEASE_116 doesn't exist

エラーの原因

Seleniumのバージョンが古いため

対策

  1. Seleniumのバージョンをチェック
    pip show selenium
  2. Seleniumのバージョンが4.11.2より古い場合はSeleniumをバージョンアップ
    pip install selenium --upgrade
  3. コードを次のように修正
from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)

以上

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