Once you have documented your use cases, recording or coding your test scripts should be a relatively simple task. With Silk Performer you have both the record/playback option and the option of coding your test scripts manually. Each approach has its advantages and disadvantages. The most efficient way to create test scripts with Silk Performer is to combine the two approaches, as follows:
100.001 In the “Microsoft Word” window, navigate the menu to File, Open…. 100.002 [The “Open” dialog window shows] 100.003 Select Test.doc. 100.004 Click Open. 100.005 [The “Open” dialog window goes away] 100.006[The “Microsoft Word” window has focus again]
// 100.001 In “Microsoft Word" window, hwndWordMainWindow := CitrixSearchWindow(“*Microsoft Word”, MATCH_Wildcard); CitrixWindowBringToTop(hwndWordMainWindow); // navigate the menu to File, Open…. CitrixKey(KEY_Alt); CitrixKeyString("f"); CitrixKeyString("o"); // 100.002 [The “Open” dialog window shows] hwndOpenDialog := CitrixWaitForWindowCreation(“Open”, Match_Exact); // 100.003 Select Test.doc. CitrixMouseClick(150, 100, hwndOpenDialog, MOUSE_ ButtonLeft); // 100.004 Click Open CitrixMouseClick(300, 200, hwndOpenDialog, MOUSE_ ButtonLeft); // 100.005 [The “Open” dialog window goes away] CitrixWaitForWindow(hwndOpenDialog, EVENT_Destroy); // 100.006 [The “Microsoft Word” window has focus again] CitrixWaitForWindow(hwndWordMainWindow, EVENT_Activate);If the script fails, these comments will help you determine where the script failed in reference to the use case.