Reputation: 21
We are using WatiN - 2.1.0 to take a screenshot when an test fails.when RDP is in disconnected mode on all screenshot's are recorded black(using IE9)
on Server we are running
windows server 2008 VM
internet explorer 9
The screenshots recorded on test failure are all black.
Upvotes: 2
Views: 3675
Reputation: 1718
It is not possible to take screenshots of disconnected RDP sessions. RDP uses its own display driver, which doesn't pass draw commands if the session is in a disconnected state.
Instead you could keep the RDP connection open. To allow to minimize the RDP client you may add the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
Add there a new DWORD named "RemoteDesktop_SuppressWhenMinimized" with the value "2".
Another solution is it to move the session to the console:
To prevent this, don't use the 'x' to close the remote connection, but use %windir%\system32\tscon.exe 0 /dest:console instead. (That will insure that the screen isn't locked). - Nicolas Voron
References:
Upvotes: 2