Common.txt

This function library contains generic functions that can be useful for testing objects in any application or technology and also registers these functions for use as methods with Standard Windows test objects. The functions available are:

Functions

Method AddToTestResultsThis function reports an event from your test run to the Test Results.
Method GetCheckedPropertyThis function returns the checked property of a specified Windows object.
GetDatePropertyThis function returns the date property of a specified Windows object.
GetPositionPropertyThis function returns the position property of a specified Windows object.
GetSelectionPropertyThis function returns the selection property of a specified Windows object.
GetTextPropertyThis function returns the text property of a specified Windows object.
GetValuePropertyThis function returns the value property of a specified Windows object.
OpenAppThis function opens a specified application.
OutputPropertyThis function returns the value of a specified property.
VerifyCheckedThis function verifies if the check status of a Windows object matches its expected check status.
VerifyDateThis function verifies if the date of a Windows object matches its expected date.
VerifyDisabledThis function verifies if the specified Windows object is enabled (not disabled).
VerifyEnabledThis function verifies if the specified Windows object is enabled.
VerifyPositionThis function verifies if the selected status of a Windows object matches its expected selection status.
VerifyPropertyThis function checks if the value of a property matches its expected value.
VerifyTextThis function verifies if the text in a Windows object matches its expected text.
VerifyValueThis function checks if the value of a Windows object matches its expected value.

Back to top

AddToTestResults Function

Description

This function reports an event from your test run to the Test Results.

Syntax

AddToTestResults (status, StepName, details)

Parameter

Description

status

The status of the step being reported. Valid values are micPass, micFail, micDone or micWarning.

StepName

The object name of the step.

details

Description of the report event.

Back to top

GetCheckedProperty Function

Description

This function returns the checked property of a specified Windows object.

Syntax

GetCheckedProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following objects: WinCheckBox and WinRadioButton.

Back to top

GetDateProperty Function

Description

This function returns the date property of a specified Windows object.

Syntax

GetDateProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following object: WinCalendar.

Back to top

GetPositionProperty Function

Description

This function returns the position property of a specified Windows object.

Syntax

GetPositionProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following object: WinSpin.

Back to top

GetSelectionProperty Function

Description

This function returns the selection property of a specified Windows object.

Syntax

GetSelectionProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following objects: WinList, WinListView, ListView20WndClass and ListView20WndClass.

Back to top

GetTextProperty Function

Description

This function returns the text property of a specified Windows object.

Syntax

GetTextProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following objects: Static, WinComboBox, WinEdit, and WinEditor.

Back to top

GetValueProperty Function

Description

This function returns the value property of a specified Windows object.

Syntax

GetValueProperty (obj)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

IMPORTANT

This function is registered for the following objects: Static, WinCalendar, WinCheckBox, WinComboBox, WinEdit, WinEditor, WinList, WinListView, WinRadioButton, WinSpin, WinTab, WinTreeView, ListView20WndClass, and ListViewWndClass.

Back to top

OpenApp Function

Description

This function opens a specified application.

Syntax

OpenApp (application)

Parameter

Description

application

The full name (including location) of the application you want to open.

Back to top

OutputProperty Function

Description

This function returns the value of a specified property.

Syntax

OutputProperty (obj, PropertyName)

Parameter

Description

obj

A variable containing the object on which the function should be performed.

PropertyName

The name of the property.

Return Value

The value of the property.

IMPORTANT

This function is registered for the following objects: Dialog, Static, WinButton, WinCalendar, WinCheckBox, WinComboBox, Window, WinEdit, WinEditor, WinList, WinListView, WinObject, WinRadioButton, WinScrollBar, WinSpin, WinStatusBar, WinTab, WinToolbar, WinTreeView, ListView20WndClass, ListViewWndClass.

Back to top

VerifyChecked Function

Description

This function verifies if the check status of a Windows object matches its expected check status.

Syntax

VerifyChecked (obj, ExpectedChecked)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedChecked

The expected check status for the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: WinCheckBox and WinRadioButton.

Back to top

VerifyDate Function

Description

This function verifies if the date of a Windows object matches its expected date.

Syntax

VerifyDate (obj, ExpectedDate)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedDate

The expected date for the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following object: WinCalendar.

Back to top

VerifyDisabled Function

Description

This function verifies if the specified Windows object is enabled (not disabled).

Syntax

VerifyDisabled (obj)

Parameter

Description

obj

The object name and object type of the property to be verified.

Return Value

True if the object is enabled.

IMPORTANT

This function is only for backward compatibility. You should use the VerifyEnabled function.

This function is registered for the following objects: Dialog, Static, WinButton, WinCalendar, WinCheckBox, WinComboBox, Window, WinEdit, WinEditor, WinList, WinListView, WinObject, WinRadioButton, WinScrollBar, WinSpin, WinStatusBar, WinTab, WinToolbar, WinTreeView, ListView20WndClass, ListViewWndClass.

Back to top

VerifyEnabled Function

Description

This function verifies if the specified Windows object is enabled.

Syntax

VerifyEnabled (obj)

Parameter

Description

obj

The object name and object type of the property to be verified.

Return Value

True if the object is enabled.

IMPORTANT

This function is registered for the following objects: Dialog, Static, WinButton, WinCalendar, WinCheckBox, WinComboBox, Window, WinEdit, WinEditor, WinList, WinListView, WinObject, WinRadioButton, WinScrollBar, WinSpin, WinStatusBar, WinTab, WinToolbar, WinTreeView, ListView20WndClass, ListViewWndClass.

Back to top

VerifyPosition Function

Description

This function verifies if the selected status of a Windows object matches its expected selection status.

Syntax

VerifyPosition (obj, ExpectedPosition)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedPosition

The expected position for the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following object: WinSpin.

Back to top

VerifyProperty Function

Description

This function checks if the value of a property matches its expected value.

Syntax

VerifyProperty (obj, PropertyName, ExpectedValue)

Parameter

Description

obj

The object name and object type of the property to be checked.

PropertyName

The name of the property to be checked.

ExpectedValue

The expected value of the property.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: Dialog, Static, WinButton, WinCalendar, WinCheckBox, WinComboBox, Window, WinEdit, WinEditor, WinList, WinListView, WinObject, WinRadioButton, WinScrollBar, WinSpin, WinStatusBar, WinTab, WinToolbar, WinTreeView, ListView20WndClass, ListViewWndClass.

Back to top

VerifySelection Function

Description

This function verifies if the selected status of a Windows object matches its expected selection status.

Syntax

VerifySelection (obj, ExpectedSelection)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedSelection

The expected selection status for the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: WinList, WinListView, ListView20WndClass, and ListView20WndClass.

Back to top

VerifyText Function

Description

This function verifies if the text in a Windows object matches its expected text.

Syntax

VerifyText (obj, ExpectedText)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedText

The expected text for the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: Static, WinComboBox, WinEdit, and WinEditor.

Back to top

VerifyValue Function

Description

This function checks if the value of a Windows object matches its expected value.

Syntax

VerifyValue (obj, ExpectedValue)

Parameter

Description

obj

The object name and object type to be checked.

ExpectedValue

The expected value of the object.

Return Value

True or False.

IMPORTANT

This function is registered for the following objects: Static, WinCalendar, WinCheckBox, WinComboBox, WinEdit, WinEditor, WinList, WinListView, WinRadioButton, WinSpin, WinTab, WinTreeView, ListView20WndClass, and ListViewWndClass.

Back to top

See also: