OracleTable Object
Description
An Oracle block of records.
IMPORTANT
When learning an Oracle table, UFT One identifies the table columns as being part of a table only if the columns have a description property (usually the column name). If a particular column does not have a description property, then its cells are recognized as separate controls and are learned as separate test objects.
Operations
The sections below list the built-in methods and properties that you can use as operations for the OracleTable object.
Note: You can also view a list and descriptions of the OracleTable description properties, for use in object repository descriptions, programmatic descriptions, checkpoint and output value steps, and as argument values for the GetTOProperty and GetROProperty methods.
Methods
ActivateRecord | Activates a specified record. |
CaptureBitmap | Saves a screen capture of the object as a .png or .bmp image using the specified file name. |
Check | Checks whether the actual value of an item matches the expected value. |
CheckProperty | Checks whether the actual value of the specified object property matches the specified expected value within the specified timeout. |
ChildObjects | Returns the collection of child objects contained within the object. |
GetAllROProperties | Returns the collection of properties and current values from the object in the application. |
Click | Clicks the specified location with the specified mouse button. |
EnterField | Enters a value in a specific record field. |
GetFieldItem | Returns the test object representing a specified record field. |
GetFieldValue | Retrieves the value of a specified record field. |
GetROProperty | Returns the current value of the description property from the object in the application. |
GetTOProperties | Returns the collection of properties and values used to identify the object. |
GetTOProperty | Returns the value of the specified description property from the test object description. |
Highlight | Highlights the object in the application. |
InvokeSoftkey | Invokes the specified Oracle softkey. |
IsFieldEditable | Checks whether the field is editable. |
OpenDialog | Opens a specified record field's associated dialog box. |
Output | Retrieves the current value of an item and stores it in a specified location. |
RefreshObject | Instructs UFT One to re-identify the object in the application the next time a step refers to this object. |
SelectPopupMenu | Invoke context menu and select the specified menu option. |
SetFocus | Transfers focus to a specified record field. |
SetTOProperty | Sets the value of the specified description property in the test object description. |
ToString | Returns a string that represents the test object. |
VerifyField | Checks that the value of a specified record field matches the specified value. |
WaitProperty | Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step. |
Properties
Exist | Checks whether the object currently exists in the open application. |
ActivateRecord Method
Description
Activates a specified record.
Syntax
object.ActivateRecord (RecordNumber)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. The number of the record (row). Record numbers start with 1. |
Return Type
None.
Example
'The following example uses the ActivateRecord method to activate the 4th row in the '"CATEGORY" table. OracleFormWindow("Journal Categories").OracleTable("CATEGORY").EnterField 1, "Category", "Journals" OracleFormWindow("Journal Categories").OracleTable("CATEGORY").VerifyField 2, "Description", "Africa" OracleFormWindow("Journal Categories").OracleTable("CATEGORY").SetFocus 4, 1 OracleFormWindow("Journal Categories").OracleTable("CATEGORY").ActivateRecord 4
Click Method
Description
Clicks the specified location with the specified mouse button.
Syntax
object.Click ([x], [y], [BUTTON])
Arguments
Parameter | Description |
---|---|
x |
Optional. An integer value. The x-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. Default = micNoCoordinate (center of the object). Default value = -1 |
y |
Optional. An integer value. The y-coordinate of the click. Note that the specified coordinates are relative to the upper left corner of the object. Default value = -1 |
BUTTON |
Optional. A predefined constant or number. The mouse button used to click the object. Default value = micLeftBtn |
Return Type
None.
Example
'The following example uses the Click method to click the "Attribute Groups" button in 'the "Master Item" form. OracleFormWindow("Master Item").OracleTable("ORG_ASSIGN").EnterField 2, "Assigned", True OracleFormWindow("Master Item").OracleButton("Attribute Groups").Click OracleFormWindow("Master Item").OracleTabRegion("Work In Process").OracleList("Type").Select "Push" OracleFormWindow("Master Item").Save OracleFormWindow("Master Item").CloseForm
'The following example uses the Click method to perform a left mouse-button click at 'coordinates (5,5) inside the "Item" text field. OracleFlexWindow("Parameters").OracleTextField("Range").OpenDialog OracleListOfValues("Range").Select "Specific item" OracleFlexWindow("Parameters").OracleTextField("Specific Item").SetFocus OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").Enter "NO" OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").CaptureBitmap "c:\temp\capture.bmp", True OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").Check CheckPoint("Engineering Bills") OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").InvokeSoftkey "NEXT FIELD" OracleFlexWindow("System Items").OracleTextField("Item").Click 5, 5, 0 OracleFlexWindow("System Items").OracleTextField("Item").Enter "AT23808" If (OracleFlexWindow("System Items").OracleTextField("Item").GetROProperty("Value") = "AT23808") Then OracleFlexWindow("System Items").OracleTextField("Item").Enter "AT23809" End If OracleFlexWindow("System Items").OracleTextField("Item").Output CheckPoint("Item")
EnterField Method
Description
Enters a value in a specific record field.
Syntax
object.EnterField (RecordNumber, Column, Value, [WithValidation])
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. The number of the record (row). Record numbers start with 1. |
Column |
Required. A Variant. The name of the column. The column name (with quotes) or numeric index (without quotes) can denote the item. The first (left-most) column in a table is numbered 1. |
Value |
Required. A Variant. The value to enter in the record cell. Depending on the cell type, the following values can be used: - Editable cell: text string - Radio (option) group cell: The item value (with quotes) or numeric index (without quotes). The first item in a radio group is numbered 1. - Poplist cell: The item value (with quotes) or numeric index (without quotes). The first item in a list is numbered 1. - Check box cell: "ON" "OFF", TRUE FALSE, or vbTrue vbFalse |
WithValidation |
Optional. A Boolean value. Specify whether to transfer the focus out of the cell after entering the value, thereby validating the value. Possible values: True or vbTrue: Transfers the focus out of the cell (default value) False or vbFalse: Leaves the focus in the cell Default value = True |
Return Type
None.
Example
''The following example uses the EnterField method to select the check boxes in the 'cells in row 1 of the "Assigned" column and row 2 of the 4th column of the '"ORG_ASSIGN" table. OracleNavigator("OracleNavigator").SelectMenu "Tools->Organization Assignment" OracleFormWindow("Master Item").OracleTable("ORG_ASSIGN").EnterField 1, "Assigned", True OracleFormWindow("Master Item").OracleTable("ORG_ASSIGN").EnterField 2, 4, True OracleNavigator("OracleNavigator").SelectMenu "File->Save" OracleFormWindow("Master Item").Close
GetFieldItem Method
Description
Returns the test object representing a specified record field.
Syntax
object.GetFieldItem (RecordNumber, Column)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. |
Column |
Required. A Variant. |
Return Type
An Object.
GetFieldValue Method
Description
Retrieves the value of a specified record field.
Syntax
object.GetFieldValue (RecordNumber, Column)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. The number of the record (row). Record numbers start with 1. |
Column |
Required. A Variant. The name of the column. The column name (with quotes) or numeric index (without quotes) can denote the item. The first (left-most) column in a table is numbered 1. |
Return Type
A String value.
Note: If the specified record field contains a check box, the return value is "true" (check box is selected) or "false" (check box is cleared).
Example
'The following example uses the GetFieldValue method to retrieve the value of a specific 'table cell, and then decide how to continue the test according to the cell value. If OracleFormWindow("Inventory Accounting Periods").OracleTable("PERIODS").GetFieldValue(1, "Status") <> "Open" Then OracleFormWindow("Inventory Accounting Periods").OracleButton("Change Status...").Click Else OracleNotification("Caution").Decline End If
InvokeSoftkey Method
Description
Invokes the specified Oracle softkey.
Syntax
object.InvokeSoftkey (Softkey)
Arguments
Parameter | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Softkey |
Required. A String value. The softkey function to perform. You can view the functions available in a specific form by pressing Ctrl+K in an Oracle Applications session. Softkey functions are not case sensitive. The following functions can be specified:
|
Return Type
None.
IMPORTANT
Note: When you record this method on an OracleTable object, a SetFocus method is recorded first automatically.
Example
'The following example uses the InvokeSoftkey method to close the "Navigator" tree. OracleFormWindow("Navigator").OracleTree("Navigator").Check CheckPoint("Navigator") Reporter.ReportEvent micDone, "OracleTree CheckPoint", "Indicates if all captured properties are correct. " OracleFormWindow("Navigator").OracleTree("Navigator").Select "Personal Shortcuts" OracleFormWindow("Navigator").OracleTree("Navigator").Expand "Public Shortcuts" OracleFormWindow("Navigator").OracleTree("Navigator").Collapse "Profiles" OracleFormWindow("Navigator").OracleTree("Navigator").InvokeSoftkey "EXIT" OracleNavigator("OracleNavigator").SelectMenu "File->Switch Responsibility..."
'The following example uses the InvokeSoftkey method to exit the "Item Costs_2" form 'after modifying the value in the "Rate or Amount" field. OracleFormWindow("Item Costs_2").OracleTabbedRegion("Cost Information").OracleTextField("Rate or Amount").Enter "100" OracleNavigator("OracleNavigator").SelectMenu "File->Save" OracleStatusLine("OracleStatusLine").Check CheckPoint("OracleStatusLine") OracleFormWindow("Item Costs_2").OracleTabbedRegion("Cost Information").OracleTextField("Rate or Amount").InvokeSoftkey "EXIT"
'The following example uses the InvokeSoftkey method to move to the next field in the '"Parameters" flexfield window. OracleFlexWindow("Parameters").OracleTextField("Range").OpenDialog OracleListOfValues("Range").Select "Specific item" OracleFlexWindow("Parameters").OracleTextField("Specific Item").SetFocus OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").Enter "NO" OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").CaptureBitmap "c:\temp\capture.bmp", True OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").Check CheckPoint("Engineering Bills") OracleFlexWindow("Parameters").OracleTextField("Engineering Bills").InvokeSoftkey "NEXT FIELD" OracleFlexWindow("System Items").OracleTextField("Item").Click 5, 5, 0 OracleFlexWindow("System Items").OracleTextField("Item").Enter "AT23808" If (OracleFlexWindow("System Items").OracleTextField("Item").GetROProperty("Value") = "AT23808") Then OracleFlexWindow("System Items").OracleTextField("Item").Enter "AT23809" End If OracleFlexWindow("System Items").OracleTextField("Item").Output CheckPoint("Item")
'The following example uses the InvokeSoftkey method to clear all the fields in the '"HEADERS_SUMMARY" table. OracleNavigator("OracleNavigator").SelectFunction "Cash Forecasting:Forecasts" OracleFormWindow("Find Cash Forecasts").OracleButton("Find").Click OracleFormWindow("Cash Forecasts").OracleTable("HEADERS_SUMMARY").SetFocus 1, "Template Name" OracleFormWindow("Cash Forecasts").OracleTable("HEADERS_SUMMARY").InvokeSoftkey "CLEAR BLOCK"
'The following example uses the InvokeSoftkey method to close the "Service Request" form. OracleFormWindow("Service Request").InvokeSoftkey ("EXIT") If OracleNotification("Forms").Exist Then OracleNotification("Forms").Choose ("Yes") End If
IsFieldEditable Method
Description
Checks whether the field is editable.
Syntax
object.IsFieldEditable (RecordNumber, Column)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. |
Column |
Required. A Variant. |
Return Type
A Boolean value.
OpenDialog Method
Description
Opens a specified record field's associated dialog box.
Syntax
object.OpenDialog (RecordNumber, Column)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. The number of the record (row). Record numbers start with 1. |
Column |
Required. A Variant. The name of the column. The column name (with quotes) or numeric index (without quotes) can denote the item. The first (left-most) column in a table is numbered 1. |
Return Type
None.
Example
'The following example uses the OpenDialog method to open the flexfield window 'associated with the cell in row 1 of the "Item" column of the "PULLSEQ_BLK" table. OracleFormWindow("Pull Sequence Summary").OracleTabbedRegion("Source").OracleTable("PULLSEQ_BLK").OpenDialog 1, "Item"
SelectPopupMenu Method
Description
Invoke context menu and select the specified menu option.
Syntax
object.SelectPopupMenu (Path)
Arguments
Parameter | Description |
---|---|
Path |
Required. A String value. The path of the menu to open. |
Return Type
None.
Example
'This example uses the SelectFunction method to select a function containing a tree, and navigates to the "Default - Enhancement [40]" node. 'It then uses the SelectPopupMenu method to open the pop-up menu and select the "Find..." option, and enters a search query. OracleNavigator("OracleNavigator").SelectFunction "Territory Management:Territory Administration" 'Expand the nodes to navigate to an item with a pop-up menu. OracleFormWindow("Navigator").OracleTree("Navigator").Expand "Territories->Catch All->Oracle Defect Management" OracleFormWindow("Navigator").OracleTree("Navigator").Expand "Territories->Catch All->Oracle Defect Management->Default - Enhancement [40]" 'Open the pop-up menu and select the Find option. OracleFormWindow("Navigator").OracleTree("Navigator").SelectPopupMenu "Find..." 'Enter a search query. OracleFormWindow("Territory Search").OracleTextField("Usage").OpenDialog
SetFocus Method
Description
Transfers focus to a specified record field.
Syntax
object.SetFocus (RecordNumber, Column)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. The number of the record (row). Record numbers start with 1. |
Column |
Required. A Variant. The name of the column. The column name (with quotes) or numeric index (without quotes) can denote the item. The first (left-most) column in a table is numbered 1. |
Return Type
None.
Example
'The following example uses the SetFocus method to transfer the focus to the cell in 'row 4, column 1 of the "CATEGORY" table before entering a value in the cell. OracleFormWindow("Journal Categories").OracleTable("CATEGORY").EnterField 1, "Category", "Journals" OracleFormWindow("Journal Categories").OracleTable("CATEGORY").VerifyField 2, "Description", "Africa" OracleFormWindow("Journal Categories").OracleTable("CATEGORY").SetFocus 4, 1 OracleFormWindow("Journal Categories").OracleTable("CATEGORY").EnterField 4, 1, "Journals"
'The following example uses the SetFocus method to transfer the focus to the cell in 'row 1 of the "Template Name" column of the "HEADERS_SUMMARY" table before pressing 'a specified softkey. OracleNavigator("OracleNavigator").SelectFunction "Cash Forecasting:Forecasts" OracleFormWindow("Find Cash Forecasts").OracleButton("Find").Click OracleFormWindow("Cash Forecasts").OracleTable("HEADERS_SUMMARY").SetFocus 1, "Template Name" OracleFormWindow("Cash Forecasts").OracleTable("HEADERS_SUMMARY").InvokeSoftkey "CLEAR BLOCK"
VerifyField Method
Description
Checks that the value of a specified record field matches the specified value.
Syntax
object.VerifyField (RecordNumber, Column, Value)
Arguments
Parameter | Description |
---|---|
RecordNumber |
Required. An integer value. The number of the record (row). Record numbers start with 1. |
Column |
Required. A Variant. The name of the column. The column name (with quotes) or numeric index (without quotes) can denote the item. The first (left-most) column in a table is numbered 1. |
Value |
Required. A Variant. The value against which to verify the record cell value. Depending on the cell type, the following values can be used: - Editable cell: text string - Radio (option) group cell: The item value (with quotes) or numeric index (without quotes). The first item in a radio group is numbered 1. - Poplist cell: The item value (with quotes) or numeric index (without quotes). The first item in a list is numbered 1. - Check box cell: "ON" "OFF", TRUE FALSE, or vbTrue vbFalse |
Return Type
A Boolean value.
Example
'The following example uses the VerifyField method to check whether the cell in row 2 'of the "Description" column of the "CATEGORY" table contains the text "Africa". OracleFormWindow("Journal Categories").OracleTable("CATEGORY").EnterField 1, "Category", "Journals" OracleFormWindow("Journal Categories").OracleTable("CATEGORY").VerifyField 2, "Description", "Africa" OracleFormWindow("Journal Categories").OracleTable("CATEGORY").SetFocus 4, 1 OracleFormWindow("Journal Categories").OracleTable("CATEGORY").ActivateRecord 4
See also: