When trying to get Chromium going with selenium I constantly get the following error
chromedriver
Traceback (most recent call last):
File "/home/admin/.local/lib/python3.9/site-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path
path = SeleniumManager().driver_location(options) if path is None else path
File "/home/admin/.local/lib/python3.9/site-packages/selenium/webdriver/common/selenium_manager.py", line 76, in driver_location
browser = options.capabilities["browserName"]
AttributeError: 'str' object has no attribute 'capabilities'
How I have tried getting it
print(webdriver.Chrome())
print(webdriver.Chrome("/usr/bin/chromedriver"))
print(webdriver.Chrome('/usr/lib/chromium-browser/chromedriver'))
Browser version
chromium-browser --version
Chromium 113.0.5672.95 Built on Raspbian , running on Raspbian 11
Webdriver version
sudo apt install chromium-chromedriver
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
chromium-chromedriver is already the newest version (113.0.5672.95-rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Chromedriver
chromedriver --version
ChromeDriver <Some IP> (917deeefba48411c7b40ba19aef7b229bf48acd7-refs/branch-heads/5672_63@{#13})
which chromedriver
/usr/bin/chromedriver
Where is the driver
dpkg -L chromium-chromedriver
/.
/usr
/usr/bin
/usr/bin/chromedriver
/usr/lib
/usr/lib/chromium-browser
/usr/share
/usr/share/doc
/usr/share/doc/chromium-chromedriver
/usr/share/doc/chromium-chromedriver/changelog.Debian.gz
/usr/share/doc/chromium-chromedriver/copyright
/usr/lib/chromium-browser/chromedriver
Selenium
Type "help", "copyright", "credits" or "license" for more information.
>>> import selenium
>>> selenium.__version__
'4.12.0'
Yet as you can see I have the chromium browser, I have the chromium driver, their versions match. Why isn't this working well? What does this error mean?
I have tried reading other posts to figure this one out but most of them seemed to have the issue that the driver version did not match. This is not the case here. Furthermore in the documentation for selenium it says that in version 4.6 or higher it should automatically download drivers.
What might be going on here?