Open zoltan-dulac opened 11 months ago
Thanks for the issue. What is the path to your Chrome binary? Chromedriver requires Chrome to be installed into specific paths in order to find it. If it's not located at one of these paths then you'll need to add the path to the binary into your global path.
@straker Thanks for the response. The funny thing is, it is in /Applications/Google\ Chrome.app/Contents/MacOS
, just like in that doc (I did check but forgot to mention). I didn't install it in an odd way. I am wondering if it has something to do with the security settings on the machine ... maybe the OS is blocking the launching of headless Chrome?
@straker I found out what the problem is. With version 115 and higher, chromedriver is included in Google Chrome For Testing:
https://googlechromelabs.github.io/chrome-for-testing/
The problem with the default path for OSX (i.e. /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
) is not valid anymore. It should be /Applications/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing
.
Is there a way to change this default in axe-core-npm?
I didn't realize Chrome for Testing included chromedriver. At the moment there isn't a way to change the path, but https://github.com/dequelabs/axe-core-npm/pull/704 would allow an option to change it. I'll see about getting it merged.
It looks like this issue is being fixed in Chrome for Testing and they will use the Chrome binary path by default https://github.com/GoogleChromeLabs/chrome-for-testing/issues/30. From the chrome bug tracker the fix should be released sometime soon.
Sorry ... didn't mean to close earlier .. reopened. (^_^);;;
In response to your comment about Chrome for Testing included chromedriver: I am not sure if you know, but it seems this is the only get chromedriver as well.
I appreciate you digging on this. Thanks for looking into it. Hopefully Chrome for Testing fixes this soon.
@zoltan-dulac looks like chromedriver 115 now has the fix. Would you mind testing it on your end and seeing if it works? https://github.com/GoogleChromeLabs/chrome-for-testing/issues/30#issuecomment-1663432803
Hello, I still have the same issue related with the webdriver. The Chrome version and webriver version matches. Also, I have installed axe-core/cli the latest 4.7.3 version but it runs the version 4.7.2 anyway
Looks like chromedriver on npm still installs 115.0.5790.102 and not 115.0.5790.170 which includes the fix. Looks like there's a pr in chromedriver for it.
chromedriver npm released and is now using 115.0.5790.170. Tested and it uses the Chrome binary correctly.
Hello, I don't have any changes. There is still the same error. And it is running the version 4.7.2, but I am using the version 4.7.3 in the package.json in devDependencies "@axe-core/cli": "^4.7.3". Sending the print screen
I checked the chromedriver version and it is: chromedriver@115.0.0, which is compatible with the current browser Chrome version 115.0.5790.170
How are you running the cli? If you've installed chromedriver v115 then you can use the --chromepath
option to use the version you've installed.
Product
cli
Product Version
4.7.3
Latest Version
Issue Description
Expectation
I am trying to run axe on a new OSX laptop. However, it keeps telling me
Error: WebDriverError: unknown error: cannot find Chrome binary
. I am running Chrome Version 115.0.5790.102 (Official Build) (x86_64). I have the correct Chromedriver installed for that version.Actual
Here is a copy/paste of my terminal session (with XXXXXXX obfuscating my username on my laptop):
How to Reproduce
See above.
Additional context
No other context.