Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows service that interacts with desktop screen resolution

I configured Jenkins as Selenium Grid and some Jenkins Nodes as Selenium Nodes (controlled by Jenkins Selenium plugin).

  • The nodes are connected with the option "Let Jenkins control this Windows Slave as Windows Service".
  • The service is defined automatically at the node as "interact with desktop".
  • Jenkins slave enables Selenium remote driver service
  • The problem is that the resolution of UI tests is really low (1036 x 780) where we need (1600x1200).

    Opening an RDP session doesn't help since the service was started by Jenkins.

    How to change the default resolution of windows service that can interact with Desktop?

    like image 249
    orshachar Avatar asked Nov 08 '13 00:11

    orshachar


    2 Answers

    I had the same problem as yours. Difference was I also have GUI automation besides Selenium tests. I ended up installing VNC service on all the nodes and wrote a script to change the desktop resolution before running any tests. However the highest resolution by doing that we got is 1280x1024, which resolved my problem.

    like image 134
    Andy Chen Avatar answered Oct 13 '22 23:10

    Andy Chen


    If you don't mind giving up running Jenkins Slave as Windows Service you can use this way: Jenkins on Windows and GUI Tests without RDC

    Still - that would make you maintain an open RDP session that runs Jenkins JNLP process... So that solution is working, but not very optimal.

    like image 42
    orshachar Avatar answered Oct 13 '22 22:10

    orshachar