Thursday, March 8, 2007

Choosing a Record Mode

Choosing a Record Mode
By recording, you can quickly create automated test scripts. You work with your application as usual, clicking objects with the mouse and entering keyboard input. WinRunner records your operations and generates statements in TSL, Mercury Interactive’s Test Script Language. These statements appear as a script in a WinRunner test window.
Before you begin recording a test, you should plan the main stages of the test and select the appropriate record mode. Two record modes are available: Context Sensitive and Analog.
Context Sensitive
Context Sensitive mode records your operations in terms of the GUI objects in your application. WinRunner identifies each object you click (such as a window, menu, list, or button), and the type of operation you perform (such as press, enable, move, or select).
For example, if you record a mouse click on the OK button in the Flight Reservation Login window, WinRunner records the following TSL statement in your test script:
button_press ("OK");
When you run the script, WinRunner reads the command, looks for the OK button, and presses it.