Customizing the User Toolbar - WinRunner

The User toolbar contains buttons for commands used when creating tests. In its default setting, the User toolbar enables easy access to the following WinRunner commands:

Customizing the User Toolbar

By default, the User toolbar is hidden. To display the User toolbar, choose View > User Toolbar or select User Toolbar in the Toolbars tab of the Customize Toolbars dialog box (View > Customize Toolbars). When the User toolbar is displayed, its default position is docked at the right edge of the WinRunner window.

The User toolbar is a customizable toolbar. You can add or remove buttons to facilitate access to the commands you most frequently use when testing an application. You can use the User toolbar to:

  • execute additional WinRunner menu commands. For example, you can add a button to the User toolbar that opens the GUI Map Editor.
  • paste TSL statements into your test scripts. For example, you can add a button to the User toolbar that pastes the TSL statement report_msg into your test scripts.
  • execute TSL statements. For example, you can add a button to the User toolbar that executes the TSL statement:

    load ("my_module");

  • parameterize TSL statements before pasting them into your test scripts or executing them. For example, you can add a button to the User toolbar that enables you to add parameters to the TSL statement list_select_item, and then either paste it into your test script or execute it.

Customizing the User Toolbar

Commands

You can add buttons to the User toolbar that perform frequently-used menu commands using the Customize User Toolbar dialog box.

To add a menu command to the User toolbar:

  1. Choose View > Customize User Toolbar.
  2. The Customize User Toolbar dialog box opens.
    To add a menu command to the User toolbar
    Note that each menu in the menu bar corresponds to a category in the Category pane of the Customize User Toolbar dialog box.

  3. In the Category pane, select a menu.
  4. In the Command pane, select the check box next to the menu command.
  5. Click OK to close the Customize User Toolbar dialog box.

The selected menu command button is added to the User toolbar.
To remove a menu command from the User toolbar:

  1. Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  2. In the Category pane, select a menu.
  3. In the Command pane, clear the check box next to the menu command.
  4. Click OK to close the Customize User Toolbar dialog box.

The selected menu command button is removed from the User toolbar.

Adding Buttons that Paste TSL Statements

You can add buttons to the User toolbar that paste TSL statements into test scripts. One button can paste a single TSL statement or a group of statements.

To add a button to the User toolbar that pastes TSL statements:

  1. Choose View > Customize User Toolbar. The Customize User Toolbar dialog box opens.
  2. In the Category pane, select Paste TSL.
  3. To add a button to the User toolbar that pastes TSL statements

  4. In the Command pane, select the check box next to a button, and then select the button.
  5. Click Modify. The Paste TSL Button Data dialog box opens.
    To add a button to the User toolbar that pastes TSL statements
  6. In the Button Title box, enter a name for the button.
  7. In the Text to Paste pane, enter the TSL statement(s).
  8. Click OK to close the Paste TSL Button Data dialog box.
  9. The name of the button is displayed beside the corresponding button in the Command pane.

  10. Click OK to close the Customize User Toolbar dialog box. The button is added to the User toolbar.

To modify a button on the User toolbar that pastes TSL statements:

  1. Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  2. In the Category pane, select Paste TSL.
  3. In the Command pane, select the button whose content you want to modify.
  4. Click Modify. The Paste TSL Button Data dialog box opens.
  5. Enter the desired changes in the Button Title box and/or the Text to Paste pane.
  6. Click OK to close the Paste TSL Button Data dialog box.
  7. Click OK to close the Customize User Toolbar dialog box. The button on the User toolbar is modified.

To remove a button from the User toolbar that pastes TSL statements:

  1. Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  2. In the Category pane, select Paste TSL.
  3. In the Command pane, clear the check box next to the button.
  4. Click OK to close the Customize User Toolbar dialog box. The button is removed from the User toolbar.

Adding Buttons that Execute TSL Statements

You can add buttons to the User toolbar that execute frequently-used TSL statements.

To add a button to the User toolbar that executes a TSL statement:

  1. Choose View > Customize User Toolbar.
  2. The Customize User Toolbar dialog box opens.

  3. In the Category pane, select Execute TSL.
  4. To add a button to the User toolbar that executes a TSL statement

  5. In the Command pane, select the check box next to a button, and then select the button.
  6. Click Modify.
  7. The Execute TSL Button Data dialog box opens.

    To add a button to the User toolbar that executes a TSL statement

  8. In the TSL Statement box, enter the TSL statement.
  9. Click OK to close the Execute TSL Button Data dialog box.
  10. The TSL statement is displayed beside the corresponding button in the Command pane.

  11. Click OK to close the Customize User Toolbar dialog box. The button is added to the User toolbar.

To modify a button on the User toolbar that executes a TSL statement:

  • Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  • In the Category pane, select Execute TSL.
  • In the Command pane, select the button whose content you want to modify.
  • Click Modify. The Execute TSL Button Data dialog box opens.
  • Enter the desired changes in the TSL Statement box.
  • Click OK to close the Execute TSL Button Data dialog box.
  • Click OK to close the Customize User Toolbar dialog box. The button on the User toolbar is modified.

To remove a button from the User toolbar that executes a TSL statement:

  1. Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  2. In the Category pane, select Execute TSL.
  3. In the Command pane, clear the check box next to the button.
  4. Click OK to close the Customize User Toolbar dialog box. The button is removed from the User toolbar.

Adding Buttons that Parameterize TSL Statements

You can add buttons to the User toolbar that enable you to easily parameterize frequently-used TSL statements, and then paste them into your test script or execute them.

To add a button to the User toolbar that enables you to parameterize a TSL statement:

  1. Choose View > Customize User Toolbar. The Customize User Toolbar dialog box opens.
  2. In the Category pane, select Parameterize TSL.
  3. To add a button to the User toolbar that enables you to parameterize a TSL statement:

  4. In the Command pane, select the check box next to a button, and then select the button.
  5. Click Modify.
  6. The Parameterize TSL Button Data dialog box opens.

    To add a button to the User toolbar that enables you to parameterize a TSL statement:

  7. In the TSL Statement box, enter the name of TSL function. You do not need to enter any parameters. For example, enter list_select_item.
  8. Click OK to close the Parameterize TSL Button Data dialog box. The TSL statement is displayed beside the corresponding button in the Command pane.
  9. Click OK to close the Customize User Toolbar dialog box. The button is added to the User toolbar.

To modify a button on the User toolbar that enables you to parameterize a TSL statement:

  1. Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  2. In the Category pane, select Parameterize TSL.
  3. In the Command pane, select the button whose content you want to modify.
  4. Click Modify. The Parameterize TSL Button Data dialog box opens.
  5. Enter the desired changes in the TSL Statement box.
  6. Click OK to close the Parameterize TSL Button Data dialog box.
  7. Click OK to close the Customize User Toolbar dialog box. The button on the User toolbar is modified.

To remove a button from the User toolbar that enables you to parameterize a TSL statement:

  1. Choose View > Customize User Toolbar to open the Customize User Toolbar dialog box.
  2. In the Category pane, select Parameterize TSL.
  3. In the Command pane, clear the check box next to the button.
  4. Click OK to close the Customize User Toolbar dialog box. The button is removed from the User toolbar.

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

WinRunner Topics