Python Forum
ChromeDriver breaking Python script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ChromeDriver breaking Python script
#1
Have an old script im trying to run. It uses "chromedriver.exe" to run. Every once in a while when chrome updates it breaks the app and id have to go to the chromedriver website, download the latest chromedriver.exe and replace the old one in my python script folder and it works.

When I run my python script it gives the error: "chromedriver version 114 not compatible with chrome ver 122 - chromedriver 122.06.6261.128 is recommended for chrome 122". However, on the chromedriver site it looks like after ChromeDriver 114 they no longer have .exe but zip files with a bunch of files inside.

Any ideas how i Can get chromedriver.exe version 122 to get my script running again?

Thank you.
Reply
#2
The link to driver is now in a Json file JSON API endpoints last-known-good-versions-with-downloads.json.
Example.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
import time

# Setup
# https://storage.googleapis.com/chrome-for-testing-public/122.0.6261.128/win64/chromedriver-win64.zip
options = Options()
options.add_argument("--headless=new")
ser = Service(r"C:\cmder\bin\chromedriver.exe")
browser = webdriver.Chrome(service=ser, options=options)
# Parse or automation
url = 'https://www.python.org/'
browser.get(url)
python_about = browser.find_element(By.CSS_SELECTOR, '#touchnav-wrapper > header > div > div.introduction > p')
print(python_about.text)
Output:
Python is a programming language that lets you work quickly and integrate systems more effectively. Learn More
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,293 Jun-29-2023, 11:57 AM
Last Post: gologica
  Openpyxl module breaking my code EnderSM 5 1,081 May-26-2023, 07:26 PM
Last Post: snippsat
  breaking out of nested loops Skaperen 3 1,239 Jul-18-2022, 12:59 AM
Last Post: Skaperen
  Is chromedriver detectable by heavy seured websites? kolarmi19 4 1,495 Mar-29-2022, 08:14 PM
Last Post: Larz60+
  How to use += after breaking for loop? Frankduc 2 1,497 Dec-31-2021, 01:23 PM
Last Post: Frankduc
  How to fix while loop breaking off raphy11574 3 2,199 Oct-12-2021, 12:56 PM
Last Post: deanhystad
  breaking a large program into functions, not acting as expected Zane217 9 3,034 Sep-18-2021, 12:37 AM
Last Post: Zane217
  Need to run 100+ Chrome’s with Selenium but can’t get past ~15 without breaking imillz 0 1,375 Sep-04-2021, 04:51 PM
Last Post: imillz
Exclamation Help in breaking bytes into bits through masking and shifting kamui123 9 4,594 Jan-11-2021, 07:42 AM
Last Post: kamui123
  How to kill a bash script running as root from a python script? jc_lafleur 4 5,942 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020