I'm running my automation with WiniumDriver. When I run on local machine (without headless mode) it works well, but when I run from Jenkins it doesn't work, because I'm using headless mode.
How can I disable the headless option from Jenkins?
I'm running my automation with WiniumDriver. When I run on local machine (without headless mode) it works well, but when I run from Jenkins it doesn't work, because I'm using headless mode.
How can I disable the headless option from Jenkins?
By default when a build with selenium is run in jenkins it uses headless mode.i.e. means GUI or web browser is not displayed.
If Gui/web browser is to be displayed then you may need to create Slave
node and run the build using it.
Illustration with images can be found https://wiki.jenkins.io/display/JENKINS/Step+by+step+guide+to+set+up+master+and+agent+machines+on+Windows
2 files you need to download
(i).agent.jar
(ii).slave-agent.jnlp
secret will vary from pc to pc
Jenkins path may also vary
Windows is my slave name
Open command prompt in administrative mode and run
java -jar agent.jar -jnlpUrl http://localhost:8080/computer/Windows/slave-agent.jnlp -secret c3219bc8bc5f1b86d411984866b46ddae8ea07ba6eb6egfh -workDir "C:\Program Files (x86)\Jenkins"
Finally navigate to Master node and configure # executors as 0 so that master is never used.
Hope it helps! Thanks