Checking Dates in GUI Objects - WinRunner

You can use GUI checkpoints to check dates in GUI objects (such as edit boxes or static text fields). In addition you can check dates in the contents of PowerBuilder, Visual Basic, and ActiveX control tables.

When you create a GUI checkpoint, you can use the default check for an object or you can specify which properties to check. When WinRunner’s date operations functionality is enabled:

  • The default check for edit boxes and static text fields is the date.
  • The default check for tables performs a case-sensitive check on the entire contents of a table, and checks all the dates in the table.

Note that you can also use the Insert > GUI Checkpoint > For Multiple Objects command to check multiple objects in a window. For more information about this command, see “Checking GUI Objects.”

Checking Dates with the Default Check

You can use the default check to check dates in edit boxes, static text fields, and table contents.

To check the date in a GUI object:

  1. Choose Insert > GUI Checkpoint > For Object/Window, or click the GUI Checkpoint for Object/Window button on the User toolbar.
  2. The WinRunner window is minimized, the mouse pointer turns into a pointing hand, and a help window opens.

  3. Click the object containing the date.
  4. WinRunner captures the current date and stores it in the test’s expected results folder. If you click in a table, WinRunner also captures the table contents. The WinRunner window is restored and a GUI checkpoint is inserted into the test script as an obj_check_gui statement.

For additional information on creating GUI checkpoints, see “Checking GUI Objects,”and “Checking Table Contents.”

Checking Dates Using the Check GUI Dialog Box

You can create a GUI checkpoint to check a date by specifying which properties of an object to check.

To check dates using the Check GUI dialog box:

  1. Choose Insert > GUI Checkpoint > For Object/Window, or click the GUI Checkpoint for Object/Window button on the User toolbar.

    The WinRunner window is minimized, the mouse pointer turns into a pointing hand, and a help window opens.

  2. Double-click the object containing the date. The Check GUI dialog box opens.

    To check dates using the Check GUI dialog box

  3. Highlight the object name in the Objects pane. The Properties pane lists all the properties for the selected object.
  4. Select the properties you want to check. For more information on selecting properties, see “Checking GUI Objects,”and “Checking Table Contents.”

    Note that you can edit the expected value of a property. To do so, first select it in the Properties column. Next either click the Edit Expected Value button, or double-click the value in the Expected Value column. For an edit box or a static text field, an edit field opens in the Expected Value column where you can change the value. For a table, the Edit Check dialog box opens. In the Edit Expected Data tab, edit the table contents.

  5. Click OK to close the Check GUI dialog box.
  6. An obj_check_gui statement is inserted into your test script.


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

WinRunner Topics