from selenium import webdriver
from selenium.webdriver.chrome.service import Service
driver_path = r"C:UsershpDesktopUdemychromedriver.exe" # Replace with your correct path
# Create a Service object for the ChromeDriver
service = Service(executable_path=driver_path)
# Initialize the Chrome driver using the service object
driver = webdriver.Chrome(service=service)
driver.get("https://www.google.com")
i want this line of code to work
i tried running the code and the output was
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 124
Current browser version is 123.0.6312.124 with binary path C:Program FilesGoogleChromeApplicationchrome.exe
Stacktrace:
GetHandleVerifier [0x00007FF622D3F922+3045234]
(No symbol) [0x00007FF6229E3652]
(No symbol) [0x00007FF6228A7564]
i think the issue is with my chrome.
iam using chrome version 123
and chrome driver is of version 124
how can i use the test chrome version 124 for the program to run