-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
selenium.common.exceptions.WebDriverException: Message: unknown error: c annot find Chrome binary #206
Comments
Hi @ithjz Have you tried using |
Additionally, get the new seleniumbase version 1.15.8 to take care of those deprecation warnings you see, which are related to the version of python used. Also, add a "--upgrade" to your pip install to make sure you have the latest versions of python packages being used: |
@ithjz Now, v1.15.10 should take care of the remaining DeprecationWarnings you saw (https://github.com/seleniumbase/SeleniumBase/pull/209/files), which updated methods that use regular expressions to pass raw strings. Use |
I haven't heard back in 4 days, so I'll assume this issue is resolved. Please update to the latest version of seleniumbase if you haven't already. |
(In case someone else runs into this.) seleniumbase install chromedriver Worked fine, no errors, but seleniumbase would die with "cannot find Chrome Binary". For some reason, I HAD to use seleniumbase install chromedriver latest. As soon as I did that, everything worked fine. |
It would be cool to specify custom path! |
@bukowa It can always be copied to another location, but these are the safe paths to use. There could be permissions issues, etc, when using other paths. The only time that the |
(venv) (⎈|N/A:default)➜ tests git:(new2) ✗ seleniumbase install chromedriver latest
*** chromedriver version for download = 107.0.5304.62 (Latest)
Downloading chromedriver_linux64.zip from:
https://chromedriver.storage.googleapis.com/107.0.5304.62/chromedriver_linux64.zip ...
Download Complete!
Extracting ['chromedriver'] from chromedriver_linux64.zip ...
Unzip Complete!
The file [chromedriver] was saved to:
/home/buk/Git/k8s-wp/venv/lib/python3.10/site-packages/seleniumbase/drivers/chromedriver
Making [chromedriver 107.0.5304.62] executable ...
[chromedriver 107.0.5304.62] is now ready for use! (venv) (⎈|N/A:default)➜ tests git:(new2) ✗ pytest .
(Linux uses --headless by default. To override, use --headed / --gui. For Xvfb mode instead, use --xvfb. Or hide this info with --headless, or by calling the new --headless2.)
==================================================================================================================== test session starts =====================================================================================================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /home/buk/Git/k8s-wp/tests
plugins: html-2.0.1, metadata-2.0.4, xdist-3.0.2, forked-1.4.0, rerunfailures-10.2, seleniumbase-4.8.2, ordering-0.6
collected 1 item
basic_test.py
FAILED basic_test.py::MyTestClass::test_basics - selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary
I wonder why it still doesn't work out of the box with venv :/ |
It works with firefox |
@bukowa |
Oh ok thank you |
e:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandle
r.py:242: WebDriverException
During handling of the above exception, another exception occurred:
..\seleniumbase\fixtures\base_case.py:3085: in setUp
switch_to=True)
..\seleniumbase\fixtures\base_case.py:2496: in get_new_driver
proxy_string=proxy_string)
..\seleniumbase\core\browser_launcher.py:161: in get_driver
return get_local_driver(browser_name, headless, proxy_string)
..\seleniumbase\core\browser_launcher.py:342: in get_local_driver
return webdriver.Chrome(executable_path=LOCAL_CHROMEDRIVER)
e:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.p
y:75: in init
desired_capabilities=desired_capabilities)
e:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.p
y:156: in init
self.start_session(capabilities, browser_profile)
e:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.p
y:251: in start_session
response = self.execute(Command.NEW_SESSION, parameters)
e:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.p
y:320: in execute
self.error_handler.check_response(response)
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x00000000
04F34EF0>
response = {'sessionId': '7f07e0ad8bb1dbd36eb27c3283d5a58d', 'status': 13, 'valu
e': {'message': 'unknown error: cannot find Chrom...r info: chromedriver=2.40.56
5498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=Windows NT 6.1.7601 SP1
x86_64)'}}
r.
onary
object.
e:\ProgramData\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandle
r.py:242: WebDriverException
============================== warnings summary ===============================
source:1067: DeprecationWarning: invalid escape sequence \S
source:1168: DeprecationWarning: invalid escape sequence \S
source:1289: DeprecationWarning: invalid escape sequence \S
source:131: DeprecationWarning: invalid escape sequence \d
source:141: DeprecationWarning: invalid escape sequence \d
source:358: DeprecationWarning: invalid escape sequence _
source:374: DeprecationWarning: invalid escape sequence _
source:625: DeprecationWarning: invalid escape sequence *
source:649: DeprecationWarning: invalid escape sequence *
-- Docs: https://docs.pytest.org/en/latest/warnings.html
==================== 1 failed, 9 warnings in 8.33 seconds =====================
E:\users\administrator\eclipse-workspace2\SeleniumBase-master\examples>
The text was updated successfully, but these errors were encountered: