About Creating Dialog Boxes for Interactive Input - WinRunner

You can create dialog boxes that pop up during an interactive test run, prompting the user to perform an action—such as typing in text or selecting an item from a list. This is useful when the user must make a decision based on the behavior of the application under test (AUT) during runtime, and then enter input accordingly. For example, you can instruct WinRunner to execute a particular group of tests according to the user name that is typed into the dialog box.

To create the dialog box, you enter a TSL statement in the appropriate location in your test script. During an interactive test run, the dialog box opens when the statement is executed. By using control flow statements, you can determine how WinRunner responds to the user input in each case.

There are five different types of dialog boxes that you can create using the following TSL functions:

  • create_input_dialog creates a dialog box with any message you specify, and an edit field. The function returns a string containing whatever you type into the edit field, during an interactive run.
  • create_list_dialog creates a dialog box with a list of items, and your message. The function returns a string containing the item that you select during an interactive run.
  • create_custom_dialog creates a dialog box with edit fields, check boxes, an “execute” button, and a Cancel button. When the “execute” button is clicked, the create_custom_dialog function executes a specified function.
  • create_browse_file_dialog displays a browse dialog box from which the user selects a file. During an interactive run, the function returns a string containing the name of the selected file.
  • create_password_dialog creates a dialog box with two edit fields, one for login name input, and one for password input. You use a password dialog box to limit user access to tests or parts of tests.

Each dialog box opens when the statement that creates it is executed during a test run, and closes when one of the buttons inside it is clicked.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics