background image
<< Generating Heavy User Load: Rendezvous Points | Using LoadRunner Functions in GUI Vuser Scripts >>
<< Generating Heavy User Load: Rendezvous Points | Using LoadRunner Functions in GUI Vuser Scripts >>

Understanding GUI Vuser Scripts

GUI Vuser Scripts · Developing GUI Vuser Scripts
Creating Vuser Scripts
Chapter 26, page 449
Next, the Vuser enters an account number into the ATM. The set_window function
activates the ATM window. The edit_set function instructs the Vuser to enter the
account number into the ATM's account field.
After entering the account number, the Vuser enters the amount it wants to deposit
and presses the deposit button. The edit_set function enters the amount to be
deposited in the amount field. The button_press function tells the Vuser to press
the ATM's Deposit button.
The final section of the test tells the Vuser to close the ATM application. The
menu_select_item function selects the Exit command from the File menu.
# Type in account number in the Account field.
account = 100;
set_window ( "Mercury ATM" );
edit_set ( "Account", account );
# Enter the amount to be deposited in the amount field.
amount = 50;
set_window ( "Mercury ATM" );
edit_set ( "Amount", amount );
# Press the Deposit button.
button_press ( "Deposit" );
# Close client application.
menu_select_item ( "File; Exit" );