Selenium Grid: Node as windows service and screen resolutions

1,545 views
Skip to first unread message

Alex Philippi

unread,
Jul 28, 2014, 8:17:51 AM7/28/14
to seleniu...@googlegroups.com
Hi all,
we installed a selenium grid-node on windows 7 and registered it as windows service to a hub (the nodeservice starts automatically at startup and is set to a local user). When we trigger this node with our tests, some of the test are failing because of a "wrong" screen resolution on the node machine. The local user got only the default resolution (800x600) after rebooting the node machine. I dont think its possible to set a fix screen resolution to this user without logging in this user and quit the remote session without logging out . (But that would not be an option for us)

My question now: Is it possible, to set a screen resolution before any tests? Is it a good idea to try changing the resolution with a java program?

I would take any help :)

Best regards
Alex

Krishnan Mahadevan

unread,
Jul 30, 2014, 10:22:08 PM7/30/14
to Selenium Users
Alex,

Can you please try if the recommendation in this thread http://www.thewindowsclub.com/set-screen-resolution-user-account-windows-7 helps you set the resolution on a per account level ?

w.r.t changing screen resolutions via a Java program,are you planning on doing this as part of a startup script on the machine or are you thinking of plugging this into the Node ?

If its part of a startup script, then I think you should be fine, but I dont know how this is going to work out in cases wherein you are putting this as part of a Selenium Node setup.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6ec5249d-8200-4475-a148-8071bd692211%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Oscar Rieken

unread,
Jul 31, 2014, 10:05:03 AM7/31/14
to seleniu...@googlegroups.com
Running IEDriverServer as a service is not supported

Running IEDriverServer.exe Under a Windows Service

Attempting to use IEDriverServer.exe as part of a Windows Service application is expressly unsupported. Service processes, and processes spawned by them, have much different requirements than those executing in a regular user context. IEDriverServer.exe is explicitly untested in that environment, and includes Windows API calls that are documented to be prohibited to be used in service processes. While it may be possible to get the IE driver to work while running under a service process, users encountering problems in that environment will need to seek out their own solutions.

https://code.google.com/p/selenium/wiki/InternetExplorerDriver




Serguei Kouzmine

unread,
Aug 24, 2014, 5:31:49 PM8/24/14
to seleniu...@googlegroups.com
Hello,

If you have a cpp or c# code of the service available you can
add probing / setting desired resolution.

http://www.codeproject.com/Articles/6810/Dynamic-Screen-Resolution

 If you need help with that I may provide.

If you do not have access to the service source code, check this github:
https://github.com/kohsuke/winsw
You are quite likely actually using this one.
(note the code there is old and does require some tweaks)
I may look into it of curiousity soon myself anyway.


Thanks,

Serguei Kouzmine
Reply all
Reply to author
Forward
0 new messages