Automatically taking screenshots of program window Automatically taking screenshots of program window windows windows

Automatically taking screenshots of program window


I use AutoIt plus captdll.dll for all my Windows GUI automation tasks.

Example:

Run("Notepad.exe", @WindowsDir, @SW_MAXIMIZE)   ; Open NOTEPADSleep(1000)Send("Just a Test")   ; Send some text to notepad; Save the screen to test.jpg  $anPos = WinGetClientSize("")$nLeft = 0$nTop = 0$nRight = $anPos[0]$nBottom = $anPos[1]$sFileName = "test.jpg"DllCall("captdll.dll", "int:cdecl", "CaptureScreen", "str", $sFileName, "int", 85)

This way you can automate the entire screenshot capturing process:

  • start your application with Run
  • select each of your menu options with Send
  • complete each screen's data also with Send
  • capture with DllCall("captdll.dll" ....)

You can also add conditional logic, loop, etc.


Yes. You want automated testing software, which can do all this and test your product too.

http://en.wikipedia.org/wiki/List_of_GUI_testing_tools


Testing Anywhere seems to have the functionality you need.Some words from their website:

"Powerful GUI based recording capabilities and a no-programming required user interface allows testers to quickly set up even complex test cases" ...

"Visual log reports: Testing Anywhere’s powerful Visualize option takes screenshots to create visual logs during runtime." (see here)

You could also try something more simple and (cheaper!) such as Jitbit Macro Recorder that let's you play back recorded macro's (keyboard and mouse) and then use the Shift-PrintScreen key in the macro to make screenshots. It also has a macro script editor.