Skip to content
Advertisement

SessionNotCreatedException with Selenium 4.1.3/IEDriverServer 4.0.0 without open desktop session (works with Selenium 3.141.0/IEDriverServer 2.53.1)

I’m running Selenium via a Jenkins Maven job. The job is running on a separate Jenkins agent without a remote desktop session open to it. When I run in Selenium 3.141.0 with IEDriverServer 2.53.1.0 it works fine. However, running with Selenium 4.1.3 and IEDriverServer 4.0.0.0 throws a SessionNotCreatedException. Note that if I keep a remote desktop session open it works fine with Selenium 4.1.3 and IEDriverServer 4.0.0.0. But running without an open RDP session is not desired.

I found similar issue at https://github.com/SeleniumHQ/selenium/issues/10497. I reviewed https://www.selenium.dev/documentation/ie_driver_server/ and confirmed the Windows environment and IE Selenium capabilities are setup properly. I also tried with Edge/IE11 compatibility mode and got the same problem.

Thank you in advance for your help towards resolving this issue!

WebDriver setup

JavaScript

DEBUG level log output

JavaScript

Advertisement

Answer

Finally, the best solution we found was to install a VNC server (TightVNC) and Caffeine on the Jenkins agent machine so there is always an active desktop session and the agent VM doesn’t auto-lock.

Hope this helps someone! Would also be happy hear another solution if anyone has it!

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement