When executing my Jenkins tests with Selenium WebDriver I do not see a GUI

0 votes
My code is a Selenium code and I have TestNG dependencies in it. This code and dependencies are built with maven's pom.xml file (mvn test).

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 does not come up. As in, my browser instance does not popup and I cannot actually see the test happen infront of me. Can I even see it?
May 2, 2018 in Selenium by eLiJha
• 770 points
13,375 views

2 answers to this question.

0 votes

Jenkins is a web server which is majorly used in production server...and in prod servers, most of the times, there are no GUIs.
But if you want to enable the GUI coming up in your lcoal machine, then it is still possible. 2 steps:

1. Open Windows services (or run: services.msc)
image
2. Double click on Jenkins service
3. In Logon tab, check this box: "Allow service to interact with Desktop"
image

Now it should work fine for you. ATB

answered May 2, 2018 by sniffy_god
• 780 points
This is not working for Win10. what would be the solution for same issue in Win-10
+1 vote

Hi eLiJha,

I also faced the same issue earlier in my local machine.
My test was running perfectly from the eclipse but when I moved to Jenkins it was only running in console mode. I was unable to view the UI.

So for that, you just need to make your local machine as a Jenkins slave by creating a new slave node in your Jenkins and select that node to execute the Jenkins job.

@sniffy_god , Your procedure is correct , but by using this you might get a permission problem .

Hope this will help. 

answered Jul 15, 2019 by nayan
• 160 points
Hi Nayan, thanks for sharing your answer.
Hi Nayan

I tried both the options by updating the service and running job on slave set on local still I'm able to see the execution can you pls help

this my remote directory set to on slave node : C:\Users\SYEDMUYEEN\Documents\test\Slave

launch command : java -jar C:\Users\SYEDMUYEEN\Downloads\agent.jar
Hey @Syed, have you tried @sniffy_god's solution?
Hi,

I tired this 'Allow service to interact with desktop' option still it is running in the background only.

Its ok for me to run in the background, but switch window functionality is failing.

Is there any possibility if we run it at the background and still switch windows functionality works?

Please let me know if any.

Thanks
Hey, any error you are getting in the process?

Related Questions In Selenium

+1 vote
2 answers
0 votes
3 answers

Can we run selenium tests (Firefox) on WebDriver without a GUI?

Hi ,  Yes, you can use headless browsers ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,190 points
4,018 views
0 votes
1 answer

I tried to open a new website when a new tab is opened using Selenium Webdriver

Try this code: ArrayList<String> tabs = new ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,500 points
4,439 views
0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 13, 2018 in Selenium by nsv999
• 5,500 points
6,190 views
0 votes
1 answer

How do i click on <input type=file> on any browser if i'm testing with Selenium Webdriver?

Does not matter which OS or which ...READ MORE

answered Apr 29, 2018 in Selenium by king_kenny
• 3,710 points
10,814 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP