DbTable Object
Description
The database table object used in database checkpoints.
Methods
Exist | Checks that an object exists. |
GetTOProperty | Returns the value of the specified description property from the test object description. |
SetTOProperty | Sets the specified value of a description property for an object. |
Exist Property
Description
Checks that an object exists.
Syntax
DbTable(description).Exist([Timeout])
Argument | Type | Description |
---|---|---|
Timeout | Number | Optional. The length of time to search for the object before returning a True or False value.
For more details on the Object Synchronization Timeout, see the OpenText Functional Testing User Guide |
Return Value
Boolean
DbTable("DbTable").Check CheckPoint("DbTable")
IsExists = DbTable("DbTable").Exist (0)
GetTOProperty Method
Description
Returns the value of the specified description property from the test object description. The value is taken from the Object Repository..
Note: You can use the GetTOProperty method to retrieve the values of only those properties that are included in the test object description. Specifying a property that is not included in the test object's description results in a warning status for the step and the test. For more details on adding properties to a test object description, see the OpenText Functional Testing User Guide.
Syntax
DbTable(description).GetTOProperty(Property)
Argument | Type | Description |
---|---|---|
Property | String | The description properties to retrieve from the object description. |
Return Value
Variant
The following example uses the GetTOProperty method to retrieve and view the value of the database's Source property before and after it is modified.
DbTable("DbTable").Check CheckPoint("DbTable")
IsExists = DbTable("DbTable").Exist (0)
If IsExists Then
Dim SQL
SQL = DbTable("DbTable").GetTOProperty ("Source")
MsgBox SQL
DbTable("DbTable").SetTOProperty "Source", "SELECT * FROM ADDRESS"
Dim NewSQL
NewSQL = DbTable("DbTable").GetTOProperty ("Source")
MsgBox NewSQL
End If
SetTOProperty Method
Description
Sets the specified value of a description property for an object.
Example: Notes:
SetTOProperty changes the property values used to identify an object during the test run. It has no effect on the Active Screen or the values saved in the Object Repository for the object.
Only properties that are included in the test object description can be set. For more details on adding properties to a test object description, see the OpenText Application Lifecycle Management User Guide.
Syntax
DbTable(description).SetTOProperty Property, Value
Argument | Type | Description |
---|---|---|
Property | String | The description properties to set. |
Value | Variant | The value to assign to the listed property. |
The following example uses the SetTOProperty method to modify the database table's Source property, and then retrieves and displays the new value.
DbTable("DbTable").Check CheckPoint("DbTable")
IsExists = DbTable("DbTable").Exist (0)
If IsExists Then
DbTable("DbTable").SetTOProperty "Source", "SELECT * FROM ADDRESS"
Dim NewSQL
NewSQL = DbTable("DbTable").GetTOProperty ("Source")
MsgBox NewSQL
End If