Specifying Arguments for Property Checks - WinRunner

You can perform many different property checks on objects. If you want to perform the property checks listed below on edit class and static_text class objects, you must specify arguments for those checks:

  • Compare
  • DateFormat
  • Range
  • RegularExpression
  • TimeFormat

To specify arguments for a property check on an edit class or static_text class object:

  1. Make sure that one of the GUI Checkpoint dialog boxes containing the object for whose property you want to specify arguments is open. If necessary, choose Insert > GUI Checkpoint > For Multiple Objects or Insert > Edit GUI Checklist to open the relevant dialog box.
  2. In the Objects pane of the dialog box, select the object to check.
  3. In the Properties pane of the dialog box, select the desired property check.
  4. Do one of the following:
    • Click the Specify Arguments button.
    • Double-click the default argument (for the Compare check) or the ellipsis in the corresponding Arguments column (for the other checks).
    • Right-click with the mouse and choose Specify Arguments from the pop-up menu.
  5. A dialog box for the selected property check opens.

  6. Specify the arguments in the dialog box that opens. For example, for a Date Format check, specify the date format.
  7. Click OK to close the dialog box for specifying arguments.
  8. When you are done, click OK to close the GUI Checkpoint dialog box that is open.

Compare Property Check

Checks the contents of the edit class or static_text class object (default check). Opens the Specify ‘Compare’ Arguments dialog box.

Compare Property Check

  • Click Text to check the contents as text (default setting).
  • To ignore the case when checking text, select the Ignore Case check box.
  • Click Numeric to check the contents as a number.

Note that the default argument setting for the Compare property check is a case-sensitive comparison of the object as text.

DateFormat Property Check

Checks that the contents of the edit or static_text class object are in the specified date format. To specify a date format, select it from the drop-down list in the Check Arguments dialog box.

DateFormat Property Check
Date Formats

WinRunner supports the following date formats, shown with an example for each:

mm/dd/yy 09/24/04
dd/mm/yy 24/09/04
dd/mm/yyyy 24/09/2004
yy/dd/mm 04/24/09
dd.mm.yy 24.09.04
dd.mm.yyyy 24.09.2004
dd-mm-yy 24-09-04
dd-mm-yyyy 24-09-2004
yyyy-mm-dd 2004-09-24
Day, Month dd, yyyy Friday (or Fri), September (or Sept) 24, 2004
dd Month yyyy 24 September 2004
Day dd Month yyyy Friday (or Fri) 24 September (or Sept) 2004

Range Property Check

Checks that the contents of the edit class or static_text class object are within the specified range. In the Check Arguments dialog box, specify the lower limit in the top edit field, and the upper limit in the bottom edit field.

Range Property Check

RegularExpression Property Check

Checks that the string in the edit class or static_text class object meets the requirements of the regular expression. In the Check Arguments dialog box, enter a string into the Regular Expression box. You do not need to precede the regular expression with an exclamation point.

RegularExpression Property Check
TimeFormat Property Check

Checks that the contents of the edit class or static_text class object are in the specified time format. To specify the time format, select it from the dropdown list in the Check Arguments dialog box.

TimeFormat Property Check

WinRunner supports the following time formats, shown with an example for each:

Time Formats
hh.mm.ss 10.20.56
hh:mm:ss 10:20:56
hh:mm:ss ZZ 10:20:56 AM

Closing the GUI Checkpoint Dialog Boxes

If you select property checks that requires arguments without specifying the actual arguments for them, and then click OK to close the dialog box, you are prompted to specify the arguments.

Specifying Arguments for One Property Check

If you click OK to close a GUI checkpoint dialog box when you have selected a check on a property that requires arguments, without first specifying arguments for that property check, the Check Arguments dialog box for that property check opens.

Specifying Arguments for Multiple Property Checks

If you select check boxes for multiple property checks that need arguments, and you did not specify arguments, then when you try to close the open dialog box, the Argument Specification dialog box opens. This dialog box enables you to specify arguments for the relevant property checks.

In the example below, the user clicked OK to close the Create GUI Checkpoint dialog before specifying arguments for the Date Format, Time Format, Range and RegularExpression property checks on the “Departure Time:” edit object in the sample Flights application:

Specifying Arguments for Multiple Property Checks

The property check appears in the Check column. The logical name of the object appears in the Object column. An ellipsis appears in the Arguments column to indicate that the arguments for the property check have not been specified.

To specify arguments from the Argument Specification dialog box:

  1. In the Check column, select a property check.
  2. Click the Specify Arguments button. Alternatively, double-click the property check.
  3. The dialog box for specifying arguments for that property check opens.
  4. Specify the arguments for the property check, as described above.
  5. Click OK to close the dialog box for specifying arguments.
  6. Repeat the above steps until arguments appear in the Arguments column for all property checks.
  7. Once arguments are specified for all property checks in the dialog box, click Close to close it and return to the GUI Checkpoint dialog box that is open.
  8. Click OK to close the GUI Checkpoint dialog box that is open.

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

WinRunner Topics