I have the following code
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
And get the following error :
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ~\untitled2.py:11 in <module>
driver = webdriver.Chrome(ChromeDriverManager().install())
File ~\anaconda3\envs\TFE\lib\site-packages\selenium\webdriver\chrome\webdriver.py:45 in __init__
super().__init__(
File ~\anaconda3\envs\TFE\lib\site-packages\selenium\webdriver\chromium\webdriver.py:51 in __init__
self.service.path = DriverFinder.get_path(self.service, options)
File ~\anaconda3\envs\TFE\lib\site-packages\selenium\webdriver\common\driver_finder.py:40 in get_path
msg = f"Unable to obtain driver for {options.capabilities['browserName']} using Selenium Manager."
AttributeError: 'str' object has no attribute 'capabilities'
Does anyone know where it could be from?
Thanks