Step 1 — Find chromedriver binary path
To find chromedriver
binary path, run the following command in the terminal:
which chromedriver
The output should be similar to:
/usr/local/bin/chromedriver
Step 2 — Lift the quarantine for the chromedriver binary
Now you need to tell Mac OS to trust this binary by lifting the quarantine. Do this by the following terminal command:
xattr -d com.apple.quarantine /usr/local/bin/chromedriver
Now, rerun your test or script, and it should be able to run chromedriver
without the error.