background image
<< Playback a script that completes a sale | The GUI Record Toolbar >>
Use Robot to record a script
<< Playback a script that completes a sale | The GUI Record Toolbar >>
Recording the Script
In the
Test Log
window, you can learn more about the results by expanding the
scripts in the Event Type hierarchy. In some cases, you may see a warning next to
a line that says
Unexpected Active Window
. This warning means that during the
playback, an extra window opened on your screen (for example, the message box
that starts
Do you want Windows to remember...
). Robot noticed the window
but the window did not interfere with the test results. If Robot returned the
warning, double-click the warning line to see a screenshot of the unexpected
displayed in the
Image Comparator
window. After you finish, close the
Image Comparator
Close the
Test Log
Leave your Web browser open.
Recording the Script
You use Robot to record a script while exercising parts of your application's GUI.
During recording, Robot translates the activities you perform into scripting language
commands. (Robot uses SQABasic for its scripting language. SQABasic resembles
Microsoft Visual Basic and contains additional commands tailored for automated
testing.) After you record a script, you can reuse it, for example, in regression tests
and in suites.
Starting to Record the Script
You have just run a prerecorded script to get the application to a known, consistent
starting place. You are now ready to create and record a new test script for the test
case Display Estimated Ship Date that you created in Chapter 6, Test Planning.
Exercise: Get ready to record the script.
Start recording the script from the point where the ClassicsCD Buy Beethoven Bach
v1a suite finished.
In TestManager, click
(the Record GUI Script button).
Rational Robot starts and the Record GUI dialog box opens.
In the Name box, type
Display Estimated Ship Date,
then click OK.
The GUI Record toolbar appears (see Figure 39).