python – Issue connecting to Chrome Web Driver with Selenium

I am have been trying to access google chrome through selenium and I am unable to connect to the chrome driver. Initially, I received an error stating my chrome version was not supported but I then downloaded the newest one off of chromedriver.chromium.org/downloads but I still am getting an error.

I have tried multiple methods:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select


driver=webdriver.Chrome()

Output:

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 117.0.5938.150 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

Then i tried this:

driver=webdriver.Chrome(service=Service(ChromeDriverManager().install()))

Output:
ConnectionError: Could not reach host. Are you offline?

Next:
driver=webdriver.Chrome(ChromeDriverManager().install())

Output:
ConnectionError: Could not reach host. Are you offline?

Finally:
driver=webdriver.Chrome(ChromeDriverManager())

Output:

NoSuchDriverException: Message: Unable to obtain chromedriver using Selenium Manager; 'ChromeDriverManager' object has no attribute 'capabilities'; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

If anyone has any ideas on what might be an issue right now, it would be greatly appreciated.

Read more here: Source link