Jenkins : Selenium GUI tests are not visible on Windows

allow service to interact with desktop jenkins
jenkins not running selenium tests
tests not running in jenkins
selenium tests fail jenkins
jenkins run selenium tests on remote server
selenium integration with jenkins in linux
how to run test cases in jenkins
how to start jenkins on windows startup

When I run my selenium test (mvn test) from jenkins (windows) I see only the console output. I don't see the real browsers getting opened . How can I configure jenkins so that I can see the browsers running the test?

I had the same problem, i got the solution after many attempts. This solution works ONLY on windows XP

If you are using jenkins as a windows service you need to do the following :

1) In windows service select the service of jenkins

2) Open properties window of the service -> Logon-> enable the checkbox "Allow service to interact with desktop"

After then you should reboot the service jenkins

Hope this help you :)

UPDATE:

Actually, I'm working on a an automation tool using Selenium on Windows 10, I've installed Jenkins ver. 2.207 as windows application (EXE file), it's running as windows service and ALL drivers (Chrome, FireFox, IE) are visible during test executions WITHOUT performing a mere configuration on the System or Jenkins

Jenkins : Selenium GUI tests are not visible on Windows, of the service -> Logon-> enable the checkbox “Allow service to interact with desktop” Update: To make sure this answer is understood properly by others: Jenkins Windows ‘native’ installation is not really native. It’s a wrapper around Java that runs it as a service. It’s a wrapper around Java that runs it as a service.

I got the solution. I ran jenkins from command prompt as "java -jar jenkins.war" instead of the windows installer version. Now I can see my browser based tests being executed.

Jenkins : Selenium GUI tests are not visible on Windows 7, I had the same problem, i got the solution after many attempts. This solution works ONLY on windows XP. If you are using jenkins as a windows  Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. Learn more Jenkins : Selenium GUI tests are not visible on Windows 7

If you are already doing what @Sachin suggests in a comment (i.e. looking at the machine where Jenkins actually runs) and still do not see the browsers, then your problem may be the following:

If you run Jenkins as a service in the background it won't open apps in the foreground. You may either try to run it not as a service in the foreground, or run it as a Local System account and check Allow the service to interact with desktop option. In the latter case you may get into permission problems, though.

Update: To make sure this answer is understood properly by others: Jenkins Windows 'native' installation is not really native. It's a wrapper around Java that runs it as a service.

maven Jenkins : Selenium GUI tests are not visible on Windows , When I run my selenium test (mvn test) from jenkins (windows) I see only the console output. I don't see the real browsers getting opened. How can I configure​  Jenkins : Selenium GUI tests are not visible on Windows. 0 votes . 1 view. When I run my selenium test (mvn test) from Jenkins (windows) I see only the console

To interact with desktop GUI, you should launch slave agent via JNLP: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-LaunchslaveagentviaJavaWebStart

After adding the node in Jenkins (configured as Java Web Start launch), just make a startup batch script on the node machine:

java -jar slave.jar -jnlpUrl http://{Your Jenkins Server}:8080/computer/{Your Jenkins Node}/slave-agent.jnlp

(slave.jar can be downloaded from http://{Your Jenkins Server}:8080/jnlpJars/slave.jar)

See more answers here: How to run GUI tests on a jenkins windows slave without remote desktop connection?

When executing my Jenkins tests with Selenium WebDriver, I do not , maven Jenkins : Selenium GUI tests are not visible on Windows? java -jar slave.​jar -jnlpUrl http://{Your Jenkins Server}:8080/computer/{Your Jenkins  Update: To make sure this answer is understood properly by others: Jenkins Windows 'native' installation is not really native. It's a wrapper around Java that runs it as a service. It's a wrapper around Java that runs it as a service.

In the case of Windows 7 you should not install jenkins as windows application (because in this recent version, Microsoft decided to give services their own hidden desktop even you enable the functionality "interact with desktop" in jenkins service), you may have to deploy it from a war file as follows:

1) Download jenkins.war from Jenkins official site

2) Deploy it by the command prompt : java -jar {directoryOfJenkinsFile}/jenkins.war

3) Now you can access jenkins administration on http:// localhost:8080

Hope that helps you !

Jenkins : Selenium GUI tests are not visible on Windows , Now when I schedule these tests with Jenkins on my windows machine, I only see the Console Output. The tests happen though. But the GUI  Now, Jenkins runs on windows as a service. After close investigation I found out that Windows service does not allow you to access the APPDATA folder for the particular user. I stopped the service and started jenkins using command line using java: java -jar jenkins.war . This starts the jenkins in java mode and selenium Firefox Driver

Jenkins, When I run my selenium test (mvn test) from jenkins (windows) I see only the console output. I don't see the real browsers getting opened . Most Windows services -- including those run with the option "Allow service to interact with desktop" in Windows XP and Vista -- do not have access to many of the computer's resources, including the console display. This may cause Automated GUI Tests to fail if you are running Apache Tomcat as a Windows Service and are doing any GUI testing.

[INFRA-1525] Selenium navigation not working with Jenkins running , The problem: Firefox GUI tests are not executed. However, they compile and run non-browser mode. Simple Solution: I use Linux, so, the  Jenkins:Selenium GUI tests are not visible on Windows (6) When I run my selenium test (mvn test) from jenkins (windows) I see only the console output. I don't see the real browsers getting opened . How can I configure jenkins so that I can see the browsers running the test?

Jenkins : Selenium GUI tests are not visible on Windows, Selenium navigation not working with Jenkins running as Windows service /​9618774/jenkins-selenium-gui-tests-are-not-visible-on-windows  Okay, Jenkins is uber-awesome… unless you use it to schedule Selenium UI tests Jenkins does everything you’d expect from a robust CI solution. It’s great when used with most types of automated testing tools, too — as long as we’re talking unit and API tests.

Comments
  • The browsers will open on the build server. Just want to check that you are logging into the build server and not seeing the browsers open from there.
  • This solution worked perfectly. By default this option is unchecked.
  • I can confirm that this works on both Windows Server 2016 and Windows 10 as well.
  • Not working in windows 10 or server Jedy seems to be using other system.
  • @ChandraShekhar : This solution works only in Windows XP, for windows 7 you may have to deploy Jenkins instead of installing it as windows application (see my answer below)
  • Why there is no "Allow service to interact with desktop" checkbox for user account option?
  • Thanks to this site for providing the solution forgetfulprogrammer.wordpress.com/tag/interact-with-desktop
  • The above answer is very much helpful for me. I also faced the same problem. Now solved by running jenkins as java -jar jenkins.war
  • When I run jenkins this way "java -jar jenkins.war" my projects disapeared. This was a bit scary the first time. The projects come back when I run them as the service.... but I can't see the browser in action. Any ideas?
  • @PatrickCummins you need to specify some other things such as the webroot dir ala --webroot="C:\Program Files (x86)\Jenkins\war" as well as the JENKINS_HOME environment variable prior to running the JAR, e.g. $Env:JENKINS_HOME = "C:\Program Files (x86)\Jenkins"
  • This work for me too for a javafx/swing app!! But when i launch it from the browser the forked app doesn't have focus and test testrobot doesn't work ?? Have find a solution to this
  • I tried what you suggested but it did not work out. Finally had to run jenkins as java -jar jenkins.war
  • When I said 'run it not as a service in the foreground' I actually meanu java -jar jenkins.war
  • @rajesh You should set malenkiy_scot's answer as the accepted one because it is correct and was provided before you 'figured it out' yourself.
  • Thanks, I just spend a day GUI tests to be visible on Windows and this solution worked! My tests had started failing when I ran Jenkins as a service, probably because of changes to the service's hidden desktop, for example, screen resolution changes (see @Shessuky's Windows 7 answer).