We are trying to run Selenium Tests from Jenkins on our Windows Slaves as a Gradle project.
I am able to start Selenium from bat command gradle clean Smoke_Test
and the test execution starts but it opens the browser in Background (the test case fails and it says that it cannot find a button to click on). If I manually run gradle clean Smoke_Test
on the windows VM, it starts Selenium, opens the browser in Foreground and it executes the test successfully.
Is it possible to get the browser open in foreground when Jenkins starts the Selenium Test?
I have tried to give Jenkins-Slave Windows Service permissions to Allow service to interact with desktop but it still does not work.
Edit: I have to run Jenkins as a Service as the Windows Server is a slave. I cannot run java -jar Jenkins.war
due to Enterprise restrictions.