Код:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get("
www.python.org")
Выдаёт такую ошибку:
Traceback (most recent call last):
File "C:\Рабочий стол\selenium\main.py", line 75, in
builtins.AttributeError: 'str' object has no attribute 'capabilities'
During handling of the above exception, another exception was raised:
Traceback (most recent call last):
File "C:\Рабочий стол\selenium\main.py", line 4, in
#print('Exiting sandbox process')
File "c:\appdata\local\programs\python\python311\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
super().__init__(
File "c:\appdata\local\programs\python\python311\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in __init__
self.service.path = DriverFinder.get_path(self.service, options)
File "c:\appdata\local\programs\python\python311\lib\site-packages\selenium\webdriver\common\driver_finder.py", line 40, in get_path
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
builtins.AttributeError: 'str' object has no attribute 'capabilities'