Changes to selenium chromedriver after v115

Posted on
Thu Aug 10, 2023 12:27 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Changes to selenium chromedriver after v115

Chromedriver for selenium has changed the way they deploy updates. For those of you that have automated the upgrades of the chromedriver, you'll notice that it broke recently

Sharing the shell script I updated to keep my version current. I have an Indigo variable that holds my Chrome version number. When that changes, this shell script fires. I'm sure it can be improved but it works.

Code: Select all
#!/bin/sh
# Downloads chromedriver based on your current chrome version, unzips, deletes zip file


# Get current chrome version
# Pass version number into curl call
CHROME_VERSION=$(/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version | sed 's/.*Chrome //' | tr -d '[:space:]')

ZIP_FILE_NAME=chromedriver-mac-x64.zip
CD_FILE_NAME=chromedriver

# Change the directory where we want to drop the file
cd /Library/Application\ Support/Perceptive\ Automation/Python3-includes

# delete the old chromedriver 
rm $CD_FILE_NAME

# Insert CHROME_VERSION into download URL:
curl -o ./$ZIP_FILE_NAME "https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_VERSION/mac-x64/$ZIP_FILE_NAME"

# Unzip. -o flag means overwrite
unzip -o $ZIP_FILE_NAME

# Move the chrome driver from the sub folder
mv -f /Library/Application\ Support/Perceptive\ Automation/Python3-includes/chromedriver-mac-x64/* /Library/Application\ Support/Perceptive\ Automation/Python3-includes/

# Delete sub folder
rmdir /Library/Application\ Support/Perceptive\ Automation/Python3-includes/chromedriver-mac-x64

# Delete the zip file
rm $ZIP_FILE_NAME

# Clean / remove quarantine for Apple in order to open it - Note: this is not longer needed
xattr -d com.apple.quarantine chromedriver

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests