Test Object Functions
GetROProperty:
GetROProperty method to retrieve the current
value of a test object property from a run-time object in your application.
you can retrieve the target
value of a link during the run session as follows:
link_href =
Browser("Mercury Technologies").Page("Mercury
Technologies").Link("Jobs").GetROProperty("href")
-------------------------------------------------------------------------------------------------
GetTOProperty:
Description:
Returns the value of the specified
property from the test object description.
Syntax:
object.GetTOProperty (Property)
|
Argument
|
Description
|
|
object
|
A test object of type WinTreeView.
|
|
Property
|
Required. A String value.
The property whose value is
retrieved from the object description.
|
Return Value:A Variant value.
Remarks:
GetTOProperty differs from the GetROProperty method. GetTOProperty
returns the value from the test object's description. GetROProperty
returns the current property value of the object in the application during the
test run.
-------------------------------------------------------------------------------------------------
Exist:
Description :
Syntax :
Return Value : Boolean
Example:
The following example creates a
database checkpoint and then checks that the database table object exists.
-------------------------------------------------------------------------------------------------
CheckProperty:
Description:
Checks whether the specified object
property achieves the specified value within the specified timeout.
Syntax:
object.CheckProperty
(PropertyName, PropertyValue, [TimeOut])
|
Argument
|
Description
|
|
Object
|
|
|
PropertyName
|
Required. A String value.
The name of the property whose
value is checked. The available properties are listed in the
Identification Properties page under the Properties section for each test
object.
|
|
PropertyValue
|
Required. A Variant value. The
expected value against which the actual property value should be checked. You
can either use a simple value or you can use a comparison object
together with the value to perform more complex comparisons.
|
|
TimeOut
|
Optional. An ULong object.
The time, in milliseconds, within which QuickTest should check whether
the actual value of the property matches the specified expected value. If no
value is specified, QuickTest uses the time set in the Object Synchronization
Timeout option in the Run tab of the Test Settings dialog box.
|
Return Value
A Boolean value. Returns
TRUE if the property achieves the value, and FALSE if the timeout is reached
before the property achieves the value.
A TRUE return value reports a Passed
step to the test results; a FALSE return value reports a Failed step to the
test results.
-------------------------------------------------------------------------------------------------
WaitProperty:
Description:
Waits until the specified object
property achieves the specified value or exceeds the specified timeout before
continuing to the next step.
Syntax:
object.WaitProperty
(PropertyName, PropertyValue, [TimeOut])
|
Argument
|
Description
|
|
Object
|
|
|
PropertyName
|
Required. A String value. The name
of the property whose value is checked.
|
|
PropertyValue
|
Required. A Variant value. The
value to be achieved before continuing to the next step.
|
|
TimeOut
|
Optional. A Long value. The time,
in milliseconds, after which QuickTest continues to the next step if the
specified value is not achieved. If no value is specified, QuickTest uses the
time set in the Object Synchronization Timeout option in the Run tab of the
Test Settings dialog box.
|
Return Value
A
Boolean value. Returns TRUE if the property achieves the value, and
FALSE if the timeout is reached before the property achieves the value. A FALSE
return value does not indicate a failed step.
-------------------------------------------------------------------------------------------------
GetContent:
Description:
Returns all of the items in the
combo box list.
;’[
Syntax:
object.GetContent
|
Argument
|
Description
|
|
object
|
Return Value
A
String value. The returned string contains all of the items in the
list separated by VBScript line feed characters.
-------------------------------------------------------------------------------------------------
Select:
Description:
Selects the specified item in the
list, replacing any previously selected values.
Syntax
object.Select Item
|
Argument
|
Description
|
|
object
|
|
|
Item
|
Required. A Variant value. The
value to select. The value can either be one of the items in the list or an
index. To specify the index of the item to select, use "#index".
Index values begin with 0.
|
Return Value:None.
-------------------------------------------------------------------------------------------------
GetItemsCount:
Description
Returns the number of items in the
combo box list.
Syntax
object.GetItemsCount
|
Argument
|
Description
|
|
object
|
Return Value : A Long value.
-------------------------------------------------------------------------------------------------
GetItem:
Description
Returns the value of the item
specified by the index.
Syntax
object.GetItem (Item)
|
Argument
|
Description
|
|
object
|
|
|
Item
|
Required. A Variant value. Numeric
index of the item. Index values begin with 0.
|
Return Value:A String value.
-------------------------------------------------------------------------------------------------
RowCount:
Description:
Returns the number of rows in the
table.
Syntax:
object.RowCount
|
Argument
|
Description
|
|
object
|
Return Value: A Long value.
-------------------------------------------------------------------------------------------------
ColumnCount:
Description:
Returns the number of columns in a
(report-style) list-view control.
Syntax:
object.ColumnCount
|
Argument
|
Description
|
|
object
|
Return Value:A Long value.
Remarks: Only the visible columns are counted.
-------------------------------------------------------------------------------------------------
GetCellData:
Description
Retrieves the contents of the
specified cell from the table.
Syntax
object.GetCellData (Row, Column)
|
Argument
|
Description
|
|
Object
|
|
|
Row
|
Required. A Variant value. The
0-based index of the row containing the cell whose data you want to retrieve.
The index value is recorded in the format "#N" where N is the
0-based row index. When entering the argument value manually, you can use any
of the following string or number formats: "#N", "N", or
N.
|
|
Column
|
Required. A Variant value. The
name or 0-based index of the column containing the cell whose data you want
to retrieve. The column value is recorded in the format "#N" where
N is the 0-based column index. When entering the argument value manually, you
can use any of the following string or number formats:
"ColumnName", "#N", "N", or N.
|
Return Value: A String value.
No comments:
Post a Comment