P
P
Pythonchik32019-12-29 15:43:01
Python
Pythonchik3, 2019-12-29 15:43:01

How to fix a bug in Python Selenium?

Hello, when starting a python program with selenium, an error appears:
DevTools listening on ws://127.0.0.1:50685/devtools/browser/d37215ee-4d7f-4183-b96d-82324bb3d58b
Traceback (most recent call last):
File "D:\ Home\Egor\Python\Assistant\Learning\test.py", line 2, in
driver = webdriver.Chrome()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages \selenium\webdriver\chrome\webdriver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\selenium\webdriver\ remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION , parameters)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response( response)
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_respo
nse
raise exception_class(message, screen , stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 77
How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
7
7GR, 2019-12-29
@Pythonchik3

Your version of ChromeDriver only supports Chrome 77. Either set the browser version to 77, or download the ChromeDriver of the same version as your Chrome.
Or - https://github.com/SergeyPirogov/webdriver_manager and forget about it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question