2
0
I have a UI test program which opens a browser to test and then it takes a screenshot at the end of the test. The screenshot comes with good resolution (I can see all the contents on the browser) when I run the program while I logged in to the machine via RDP.
But when I run the program as Windows service, Windows opens the browser in a virtual monitor, or somewhere I cannot see the browser, where the screen size is so small that I cannot see all the contents of the browser.
How can I change the size/resolution of the display Windows opens for services?
I don't think Windows opens a Window for services, and given that it is not drawing it, probably it can't screenshot something that it doesn't draw – fernando.reyes – 2017-03-07T16:49:20.660
actually I can see a screenshot.. however the image covers only portion of the browser. – Dhana – 2017-03-08T15:38:38.253
1
Do you think this will help you? Now I understand a little bit better what happens there http://stackoverflow.com/questions/18891819/windows-service-screen-capture-returns-black-screen
– fernando.reyes – 2017-03-08T15:40:54.217This link led me to few other good links as well, all helpful to understand the problem and looks like my process shouldn't be run as a service as its display size may not be as expected. – Dhana – 2017-03-08T16:09:28.913