We have configured to capture screenshot when selenium (or any web based automation test, e.g. web driver, sahi, etc… ) tests failed, but each time we got is a blank image which only has a black background. The CI agent runs on Windows 2008 in a virtual machine
There is no any real window opened because nobody logged on this machine, so the captured image is only a blank image. The solution is turn on auto logon for windows and never lock the desktop
turn on auto logon for windows
Based on the above posts, the manual steps are:
run command: control userpasswords2
Select the account from the list, uncheck the “Users must enter a user name and password to use this computer. ” and apply
You can also edit the registry, and the steps can be applied to multiple machines using psexec in this way, but I didn’t try that.
never lock the desktop
The manual steps are:
- Right click on desktop, select Personalization
- Select Screen Saver,
- Clear the check box “On resume, display logon screen”.