Capture screen on server desktop session

后端 未结 6 1337
臣服心动
臣服心动 2020-11-30 06:17

I have developed a GUI test framework that does integrationtesting of our company website on a scheduled basis. When something fails, it\'ll take a screenshot of the desktop

6条回答
  •  一生所求
    2020-11-30 06:25

    I think the problem may be that you're on the wrong WindowStation. Have a look at these articles;

    Why does print screen in a Windows Service return a black image?

    Screen capture from windows service

    It could be that your win-station is dissappearing when you disconnect. Are you running the application when you log in and then trying to leave it running when you disconnect?

    If so, does it still do it if you connect with "mstsc /admin"? In other words, connecting to and running on the console session? If not, this might be a workaround.

提交回复
热议问题