Professional Documents
Culture Documents
Winrunner: Creating Dialog Boxes For Interactive Input
Winrunner: Creating Dialog Boxes For Interactive Input
Winrunner: Creating Dialog Boxes For Interactive Input
• During an interactive test run, the dialog box opens when the
statement is executed.
Syntax:
create_input_dialog ( message );
Example..,
name = create_input_dialog ("Please type in your name.");
Creating a List Dialog Box
Syntax:
create_list_dialog ( title, message, list_items );
➤ title - is an expression that appears in the window banner of the dialog box.
➤ message - is one line of text that appear in the dialog box.
➤ list_items - contains the options that appear in the dialog box. Items are
separated by commas, and the entire list is considered a single string.
Example:
filename = create_list_dialog ("Select an Input File", "Please select one of the
following tests as input", "Batch_1, clock_2, Main_test, Flights_3, Batch_2");
Creating a Custom Dialog Box
• Syntax:
create_custom_dialog ( function_name, title, button_name,
edit_name1-n,check_name1-m );
• filter sets a filter for the files to display in the Browse dialog
box. We can use wildcards to display all files (*.*) or only
selected files (*.exe or *.txt, etc.).
Example..,
filename = create_browse_file_dialog( "*.dll;*.exe" );
Creating a Password Dialog Box
• A password dialog box has two edit fields, an OK button, and a
Cancel button.
Syntax:
• Example:
set_window("Calculator");
win_mouse_click ("Calculator", 87, 175);
win_mouse_click ("Calculator", 204, 200);
win_mouse_click ("Calculator", 121, 163);
win_mouse_click ("Calculator", 242, 201);
• set_window ("Calculator");
• button_press("seven");
• button_press("plus");
• button_press("four");
• button_press("equal");
Transactions
• We can measure how long it takes to run a section of your test by
defining transactions.
• A transaction represents the business process that we are
interested in measuring.
• start_transaction
• end_transaction