Game Development Reference
In-Depth Information
* Ignore During Compare:
************************************************************
ActivateWindow —> “Progman�?, “Program Manager�?, NULL, 10.0......Result: Success
ActivateWindow —> “SysListView32�?, “FolderView�?, 1, 10.0........Result: Success
ClickListView —> 1, “Dawn of War�?, DBLCLK, 0.0..................Result: Success
ActivateWindow —> “Plat::Window {DB3DC0D7-BBA3-4d06-BCD8-40CD448B4AE3}�?, “Warhammer
40,000: Dawn of War�?, NULL, 10.0...Result: Success
Keys —> “[Esc][Esc][Esc]�?, 0.0, 1.04, 1.07......................Result: Success
MouseClick —> 540, 396, INTEL, LEFT, 19.59......................Result: Success
CompareScreen —> “Region 1�?.....................................Result: Failure
Capture/Playback Example
Now it's your turn to sit in the driver's seat. Check to see if you have the Minesweeper
game on your PC. In Windows XP, go to All Programs\Games\Minesweeper. This
game tests your skill at identifying the locations of mine placed on a grid. The random
placement of mines on the field is not under your control, so that part of the game is
not a good candidate for capture/playback testing. However, you can change some
game options that affect the size of the game board. Those will be the subject of this
automation example.
Before starting the automation process, put a Minesweeper shortcut (icon) on your
Desktop. You can probably find one to copy at Documents and Settings\All
Users\Start Menu\Programs\Games on your PC. This will make it easy to launch
Minesweeper during recording and playback.
Note
It's not a good idea to have your automated test launch applications from the Windows “All Programs�?
menu. If any apps have been added or deleted since the time you made the test recording, the
menu order will be different and the mouse will be happily clicking away at whatever is there.
Nothing ruins your day like having apps uninstalled by an automated test.
If you haven't done so already, get the demo version of Vermont HighTest from their
Web site and install it on your PC. After installation is successful, double-click the
“Vermont Hightest�? icon and you're ready to continue.
Minesweeper Test Capture
Before you start recording, review the following steps. Then select New from the
Record menu or hit F11 to begin recording.
 
 
Search WWH ::




Custom Search