I am facing the below error on Jenkins scheduled execution. The execution was successfully done when I executed myself but when I set the schedule execution it show me the error.
Here the Image of the Error Message:
I am facing the below error on Jenkins scheduled execution. The execution was successfully done when I executed myself but when I set the schedule execution it show me the error.
Here the Image of the Error Message:
This error message...
...implies that SessionNotCreatedException
was raised as ChromeDriver was unable to spawn a new browsing context i.e. google-chrome session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
So there is a clear mismatch between the major version of chromedriver=115.0 and the chrome=114.0.5735.201
Ensure that ChromeDriver is downgraded to ChromeDriver v114.0 level to match the chrome=114.0.5735.201 and execute your test.
Further, if you are using Selenium v4.6 or above you don't have to explicitly use ChromeDriverManager().install() anymore as Selenium Manager can silently download the matching ChromeDriver and your minimal code block can be:
from selenium import webdriver
Option = webdriver.ChromeOptions()
options.add_argument("--start-maximized")
driver = webdriver.Chrome(options=Option)
driver.get("https://google.com/")