Game Development Reference
In-Depth Information
LogComment(“Nothing more to check, just shutting down for next test...�?)
ClickButton(“OK�?, 1, 12.25)
ActivateWindow(“Minesweeper�?, “Minesweeper�?, NULL, 10.0)
ClickMenu(“&Game�?, 0.11)
ClickMenu(“&Game;&Beginner�?, 1.13)
CloseWindow(“Minesweeper�?)
To use this routine, Call it from the main test file. Since it's in its own file, use the file-
name as the call parameter. You should add this line to the end of the main test. Don't
forget the .inb file extension.
Call(“cleanmine.inb�?)
Now you can run the main test file and it will call the cleanup file. When your auto-
mated test ends, Minesweeper has been put back into Beginner mode and closed up for
the next test. The test produces a single test log that incorporates the results of the main
test file and the external cleanmine routine. Your results should look like the following:
************************************************************
* FileName: c:\documents and settings\administrator\desktop\vht test
files\minesweepercp\minetest3.inb
* Log Created on: Thu Dec 23 13:14:43 2004
*
* Playback Options:
* Play Speed: 50
* Terminate on Failure:
*
* Ignore During Compare:
************************************************************
ActivateWindow —> “Shell_TrayWnd�?, “�?, NULL, 10.0...............Result: Success
ActivateWindow —> “Progman�?, “Program Manager�?, NULL, 10.0......Result: Success
ActivateWindow —> “SysListView32�?, “FolderView�?, 1, 10.0........Result: Success
ClickListView —> 1, “Minesweeper�?, DBLCLK, 0.0..................Result: Success
CompareScreen —> “Window 1�?.....................................Result: Failure
ActivateWindow —> “Minesweeper�?, “Minesweeper�?, NULL, 10.0......Result: Success
ClickMenu —> “&Game�?, 0.09......................................Result: Success
ClickMenu —> “&Game;&Custom...�?, 2.67...........................Result: Success
CompareScreen —> “Region 1�?.....................................Result: Success
ActivateWindow —> “#32770�?, “Custom Field�?, NULL, 10.0..........Result: Success
ClickEdit —> 141, 1, 0, 0.09....................................Result: Success
Keys —> “[Backspace]�?, 0.82.....................................Result: Success
Search WWH ::




Custom Search