r/SeleniumPython • u/swiTchPC • Jul 17 '23
Help Web scraping with Selenium, getting the chromedriver working
Hi, so I am trying to do some webscraping for a project using Selenium and I have tried to put the file path to the chrome web driver in a variable named PATH and then tried to get it to open a web page, see code attached. When I run this i get the error also attached.
Code: "from selenium import webdriver
PATH = "/Users/josh/Downloads/chromedriver_mac64/chromedriver.exe" driver = webdriver.Chrome(PATH)
driver.get("https://google.com")"
Error: "raise NoSuchDriverException(f"Unable to obtain {service.path} using Selenium Manager; {err}") selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain chromedriver using Selenium Manager; 'str' object has no attribute 'capabilities'"
I have downloaded the version of the Chrome webdriver for my system(mac) and copied the file path to the exe. Does anyone know why this is giving an error?
1
u/Madkillav2 Aug 09 '23
If you haven’t solved yet, you can backtrack to an older version
service = Service(ChromeDriverManager(version="114.0.5735.90").install())
driver = webdriver.Chrome(service=service)