Unable to update ChromeDriver since Chrome for Testing released
Asked Answered
B

1

7

I'm using Selenium and ChromeDriver to automate the scraping of data from various websites on a Mac (arm-64). Whenever Chrome updates to a new major version, I have had to download and install the newest version of ChromeDriver to go with it. Starting after Chrome 115, the JSON endpoints no longer yield a file containing ChromeDriver. Instead, they yield a zip file containing an app called "Google Chrome for Testing". I have not been figure out how to make this work in place of the old ChromeDriver. If I install the app and try to run it, I get a message that the app is damaged. If I also just try to run my program, I still get the message about ChromeDriver not supporting that version of Chrome (CD version = 115 and Chrome version = 117).

Bullheaded answered 13/9, 2023 at 19:7 Comment(0)
A
4

If I install the app and try to run it, I get a message that the app is damaged.

macOS says the *.app is damaged. What now?

See https://github.com/GoogleChromeLabs/chrome-for-testing?tab=readme-ov-file#macos-says-the-app-is-damaged-what-now. TL;DR:

On macOS, if you download a Chrome for Testing ZIP file using a browser instead of via @puppeteer/browsers, curl, or wget, you might get this warning:

“Google Chrome for Testing.app” is damaged and can’t be opened. You should move it to the Trash.

This happens because macOS Gatekeeper sets an extended attribute that marks the ZIP file and any files within it as “downloaded via a browser” and thus potentially dangerous.

To fix the problem, recursively remove the extended attribute:

xattr -cr 'Google Chrome for Testing.app'

Chromedriver

It should be possible to download standalone chromedriver, without cft.

See the download URLs here: https://googlechromelabs.github.io/chrome-for-testing/

For example: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.85/mac-arm64/chromedriver-mac-arm64.zip

Afar answered 26/1 at 21:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.