Property Checks and Default Checks - WinRunner

When you create a GUI checkpoint, you can determine the types of checks to perform on GUI objects in your application. For each object class, WinRunner recommends a default check. For example, if you select a push button, the default check determines whether the push button is enabled. Alternatively, you can specify in a dialog box which properties of an object to check. For example, you can choose to check a push button’s width, height, label, and position in a window (x- and y-coordinates).

To use the default check, you choose a Insert > GUI Checkpoint command. Click a window or an object in your application. WinRunner automatically captures information about the window or object and inserts a GUI checkpoint into the test script.

To specify which properties to check for an object, you choose a Insert > GUI Checkpoint command. Double-click a window or an object. In the Check GUI dialog box, choose the properties you want WinRunner to check. Click OK to save the checks and close the dialog box. WinRunner captures information about the GUI object and inserts a GUI checkpoint into the test script.

The following sections show the types of checks available for different object classes.

Calendar Class

You can check the following properties for a calendar class object:

Enabled: Checks whether the calendar can be selected.

Focused: Checks whether keyboard input will be directed to the calendar.

Height: Checks the calendar’s height in pixels.

Selection: The selected date in the calendar (default check).

Width: Checks the calendar’s width in pixels.

X: Checks the x-coordinate of the top left corner of the calendar, relative to the window.

Y: Checks the y-coordinate of the top left corner of the calendar, relative to the window.

Check_button Class and Radio_button Class

You can check the following properties for a check box (an object of check_button class) or a radio button:

Enabled: Checks whether the button can be selected.

Focused: Checks whether keyboard input will be directed to this button.

Height: Checks the button’s height in pixels.

Label: Checks the button’s label.

State: Checks the button’s state (on or off) (default check).

Width: Checks the button’s width in pixels.

X: Checks the x-coordinate of the top left corner of the button, relative to the window.

Y: Checks the y-coordinate of the top left corner of the button, relative to the window.

Edit Class and Static Text Class

You can check the properties below for edit class and static_text class objects.

Checks on any of these five properties (Compare, DateFormat, Range, RegularExpression, and TimeFormat) require you to specify arguments. For information on specifying arguments for property checks, see “Specifying Arguments for Property Checks”.

Compare: Checks the contents of the object (default check). This check has arguments. You can specify the following arguments:

  • a case-sensitive check on the contents as text (default setting)
  • a case-insensitive check on the contents as text
  • numeric check on the contents

DateFormat: Checks that the contents of the object are in the specified date format. You must specify arguments (a date format) for this check. WinRunner supports a wide range of date formats. For a complete list of available date formats, see “Date Formats”.

Enabled: Checks whether the object can be selected.

Focused: Checks whether keyboard input will be directed to this object.

Height: Checks the object’s height in pixels.

Range: Checks that the contents of the object are within the specified range. You must specify arguments (the upper and lower limits for the range) for this check.

RegularExpression: Checks that the string in the object meets the requirements of the regular expression. You must specify arguments (the string) for this check. Note that you do not need to precede the regularexpression with an exclamation point. For more information, see, “Using Regular Expressions.”

TimeFormat: Checks that the contents of the object are in the specified time format. You must specify arguments (a time format) for this check. WinRunner supports the time formats shown below, with an example for each format.

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

Width: Checks the text object’s width in pixels.

X: Checks the x-coordinate of the top left corner of the object, relative to the window.

Y: Checks the y-coordinate of the top left corner of the object, relative to the window.

List Class

You can check the following properties for a list object:

Content: Checks the contents of the entire list.

Enabled: Checks whether an entry in the list can be selected.

Focused: Checks whether keyboard input will be directed to this list.

Height: Checks the list’s height in pixels.

ItemsCount: Checks the number of items in the list.

Selection: Checks the current list selection (default check).

Width: Checks the list’s width in pixels.

X: Check the x-coordinate of the top left corner of the list, relative to the window.

Y: Check the y-coordinate of the top left corner of the list, relative to the window.

Menu_item Class

Menus cannot be accessed directly, by clicking them. To include a menu in a GUI checkpoint, click the window title bar or the menu bar. The Add All dialog box opens. Select the Menus option. All menus in the window are added to the checklist. Each menu item is listed separately.

You can check the following properties for menu items:

HasSubMenu: Checks whether a menu item has a submenu.

ItemEnabled: Checks whether the menu is enabled (default check).

ItemPosition: Checks the position of each item in the menu.

SubMenusCount: Counts the number of items in the submenu.
Object Class

You can check the following properties for an object that is not mapped to a standard object class:

Enabled: Checks whether the object can be selected.

Focused: Checks whether keyboard input will be directed to this object.

Height: Checks the object’s height in pixels (default check).

Width: Checks the object’s width in pixels (default check).

X: Checks the x-coordinate of the top left corner of the GUI object, relative to the window (default check).

Y: Checks the y-coordinate of the top left corner of the GUI object, relative to the window (default check).

Push_button Class

You can check the following properties for a push button:

Enabled: Checks whether the button can be selected (default check).

Focused: Checks whether keyboard input will be directed to this button.

Height: Checks the button’s height in pixels.

Label: Checks the button’s label.

Width: Checks the button’s width in pixels.

X: Checks the x-coordinate of the top left corner of the button, relative to the window.

Y: Checks the y-coordinate of the top left corner of the button, relative to the window.

Scroll Class

You can check the following properties for a scrollbar:

Enabled: Checks whether the scrollbar can be selected.

Focused: Checks whether keyboard input will be directed to this scrollbar.

Height: Checks the scrollbar’s height in pixels.

Position: Checks the current position of the scroll thumb within the scrollbar (default check).

Width: Checks the scrollbar’s width in pixels.

X: Checks the x-coordinate of the top left corner of the scrollbar, relative to the window.

Y: Checks the y-coordinate of the top left corner of the scrollbar, relative to the window.

Window Class

You can check the following properties for a window:

CountObjects: Counts the number of GUI objects in the window (default check).

Enabled: Checks whether the window can be selected.

Focused: Checks whether keyboard input will be directed to this window.

Height: Checks the window’s height in pixels.

Label: Checks the window’s label.

Maximizable: Checks whether the window can be maximized.

Maximized: Checks whether the window is maximized.

Minimizable: Checks whether the window can be minimized.

Minimized: Checks whether the window is minimized.

Resizable: Checks whether the window can be resized.
SystemMenu: Checks whether the window has a system menu.

Width: Checks the window’s width in pixels.

X: Checks the x-coordinate of the top left corner of the window.

Y: Checks the y-coordinate of the top left corner of the window.


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

WinRunner Topics