Checking Properties of DropDown Objects - WinRunner

You can create a GUI checkpoint that checks the properties, including contents, of a DropDown list or a DropDown DataWindow. You can check the same properties, including contents, for a DropDown DataWindow that you can check for a regular DataWindow. Note that before creating a GUI checkpoint on a DropDown object, you should first record a tbl_set_selected_cell statement in your test script. Use the CHECK GUI FOR OBJECT/WINDOW softkey to create the GUI checkpoint while recording. You create a GUI checkpoint that checks the contents of a DropDown object as you would create one for a table. For information on checking tables, see “Checking Table Contents.”

Checking Properties of a DropDown Object with Default Checks

You can create a GUI checkpoint that performs a default check on a DropDown object. A default check on a DropDown object includes a casesensitive check on the contents of the entire object. WinRunner uses column names and the index number of rows to check the cells in the object.

You can also perform a check on a DropDown object in which you specify which checks to perform. For additional information, see “Checking Properties of a DropDown Object while Specifying which Checks to Perform”

To check the properties of a DropDown object with default checks:

  1. Choose Test > Record–Context Sensitive or click the Record–Context Sensitive button.
  2. Click in the DropDown object to record a tbl_set_selected_cell statement in your test script.
  3. While recording, press the CHECK GUI FOR OBJECT/WINDOW softkey.
  4. Click in the DropDown object once.

WinRunner captures the GUI information and stores it in the test’s expected results folder. The WinRunner window is restored and an obj_check_gui statement is inserted into the test script.

Checking Properties of a DropDown Object while Specifying which Checks to Perform

You can create a GUI checkpoint in which you specify which checks to perform on a DropDown object. When you double-click in a DropDown object while creating a GUI checkpoint, the Check GUI dialog box opens. If you are checking, for example, a DropDownListBox, you can double-click the DropDownListBoxContent property check in the Check GUI dialog box to open the Edit Check dialog box. In the Edit Check dialog box, you can specify the scope of the content check on the object, select the verification types and method, and edit the expected value of the DataWindow contents.

To check the properties of a DropDown object while specifying which checks to perform:

  1. Choose Test > Record–Context Sensitive or click the Record–Context Sensitive button.
  2. Click in the DropDown object to record a tbl_set_selected_cell statement in your test script.
  3. While recording, press the CHECK GUI FOR OBJECT/WINDOW softkey.
  4. Double-click in the DropDown object.
  5. The Check GUI dialog box opens.

    To check the properties of a DropDown object while specifying which checks to perform

    The example above displays the Check GUI dialog box for a DropDown list. The Check GUI dialog box for a DropDown DataWindow is identical to the dialog box for a Data Window.

  6. In the Properties pane, select the DropDownListBoxContent check and click the Edit Expected Value button, or double-click the “<complex value>” entry in the Expected Value column.

    The Edit Check dialog box opens.

  7. You can select which checks to perform and edit the expected data. For additional information on using this dialog box, see “Understanding the Edit Check Dialog Box”
  8. When you are done, click OK to save your changes, close the Edit Check dialog box, and restore the Check GUI dialog box.
  9. Click OK to close the Check GUI dialog box.
  10. WinRunner captures the GUI information and stores it in the test’s expected results folder. The WinRunner window is restored and an obj_check_gui statement is inserted into the test script.


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

WinRunner Topics