SiebTree Object
Description
A tree view object in a Siebel test automation environment.
Operations
The sections below list the built-in methods and properties that you can use as operations for the SiebTree object.
Note: You can also view a list and descriptions of the SiebTree 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
CaptureBitmap | Saves a screen capture of the object as a .png or .bmp image, depending on the specified file extension. |
Check | Checks whether the actual value of an item matches the expected value. |
CheckProperty | Checks whether the specified object property achieves the specified 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. |
Collapse | Collapses a node in the tree view. |
Expand | Expands a node in the tree view. |
GetChildCount | Returns the number of child nodes of the tree item that are displayed on the current page. |
GetROProperty | Returns the current value of the specified 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. |
GetTreeItemName | Returns the visible text of the specified tree item. |
IsExists | Indicates whether the specified object exists (TRUE) or does not exist (FALSE). |
IsExpanded | Indicates whether the specified tree node is expanded (TRUE) or collapsed (FALSE). |
NextPage | Scrolls the tree view to the next page. |
Output | Retrieves the current value of an item and stores it in a specified location. |
PreviousPage | Scrolls the tree view to the previous page. |
RefreshObject | Instructs OpenText Functional Testing to re-identify the object in the application the next time a step refers to this object. |
Select | Selects a node in the tree view. |
SetTOProperty | Sets the value of the specified description property in the test object description. |
ToString | Returns a string that represents the current test object. |
WaitProperty | Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step. |
Properties
ActiveTreeItem | A data item representing the visible text of the current tree item. |
ClassName | The class of the object. |
Exist | Checks whether the object currently exists in the open application. |
RepositoryName | The name of the object as it is stored in the repository. |
UIName | The name of the object as it appears in the user interface. |
Collapse Method
Description
Collapses a node in the tree view.
Syntax
object.Collapse (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
None.
Example
'The following example uses the Collapse method to collapse the selected record
'in a tree.
Dim Active_Row, Active_Account_List, Col_Rep_Name, position
position = "1.6"
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
Accounts_Tree.Select position
Active_Row = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").ActiveRow
Col_Rep_Name = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetColumnRepositoryName("Account Name")
Active_Account_List = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetCellText(Col_Rep_Name, Active_Row)
If Active_Account_List = Accounts_Tree.ActiveTreeItem Then
Reporter.ReportEvent 0, "SiebTree", "Corresponding record is selected"
Else
Reporter.ReportEvent 1, "SiebTree", "Corresponding record is not being selected"
End If
If Accounts_Tree.IsExpanded(position) Then
Accounts_Tree.Expand position
Accounts_Tree.Collapse position
End If
Expand Method
Description
Expands a node in the tree view.
Syntax
object.Expand (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
None.
Example
'The following example uses the Expand method to expand the selected record
'in a tree.
Dim Active_Row, Active_Account_List, Col_Rep_Name, position
position = "1.6"
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
Accounts_Tree.Select position
Active_Row = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").ActiveRow
Col_Rep_Name = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetColumnRepositoryName("Account Name")
Active_Account_List = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetCellText(Col_Rep_Name, Active_Row)
If Active_Account_List = Accounts_Tree.ActiveTreeItem Then
Reporter.ReportEvent 0, "SiebTree", "Corresponding record is selected"
Else
Reporter.ReportEvent 1, "SiebTree", "Corresponding record is not being selected"
End If
If Accounts_Tree.IsExpanded(position) Then
Accounts_Tree.Expand position
Accounts_Tree.Collapse position
End If
GetChildCount Method
Description
Returns the number of child nodes of the tree item that are displayed on the current page.
Syntax
object.GetChildCount (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
A long integer value.
Example
'The following example uses the GetChildCount method to navigate to a certain
'position in the tree and then count its child nodes.
Dim position, child_count
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
position = "1.5"
If Accounts_Tree.IsExists(position) Then
child_count = Accounts_Tree.GetChildCount(position)
Reporter.ReportEvent 0, "SiebTree", "Item has " & child_count
GetTreeItemName Method
Description
Returns the visible text of the specified tree item.
Syntax
object.GetTreeItemName (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
A String value.
Example
'The following example uses the GetTreeItemName method to navigate to the
'"Accounts" screen and then select "Explorer" view and check whether the first
'item is selected by default.
Dim DefaultItem
Dim FirstItem
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
DefaultItem = Accounts_Tree.ActiveTreeItem
FirstItem = Accounts_Tree.GetTreeItemName("1.1")
If FirstItem = DefaultItem Then
Reporter.ReportEvent 0, "SiebTree", "First Item is selected by default"
Else
Reporter.ReportEvent 1, "SiebTree", "First Item is not selected by default"
End If
IsExists Method
Description
Indicates whether the specified object exists (TRUE) or does not exist (FALSE).
Syntax
object.IsExists (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
A String value.
Example
'The following example uses the IsExists method to check whether a specified
'tree node exists, and if it does then count its child nodes.
Dim position, child_count
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
position = "1.5"
If Accounts_Tree.IsExists(position) Then
child_count = Accounts_Tree.GetChildCount(position)
Reporter.ReportEvent 0, "SiebTree", "Item has " & child_count
IsExpanded Method
Description
Indicates whether the specified tree node is expanded (TRUE) or collapsed (FALSE).
Syntax
object.IsExpanded (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
A String value.
Example
'The following example uses the IsExpanded method to check whether a specific record is expanded,
'and then expands and collapses the selected record in the tree.
Dim Active_Row, Active_Account_List, Col_Rep_Name, position
position = "1.6"
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
Accounts_Tree.Select position
Active_Row = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").ActiveRow
Col_Rep_Name = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetColumnRepositoryName("Account Name")
Active_Account_List = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetCellText(Col_Rep_Name, Active_Row)
If Active_Account_List = Accounts_Tree.ActiveTreeItem Then
Reporter.ReportEvent 0, "SiebTree", "Corresponding record is selected"
Else
Reporter.ReportEvent 1, "SiebTree", "Corresponding record is not being selected"
End If
If Accounts_Tree.IsExpanded(position) Then
Accounts_Tree.Expand position
Accounts_Tree.Collapse position
End If
NextPage Method
Description
Scrolls the tree view to the next page.
Syntax
object.NextPage
Return Type
None.
Example
'The following example uses the NextPage method to navigate to the first record
'and then go to the next page.
SiebApplication("Siebel Call Center").SiebMenu("Menu").Select "Navigate\\Navigate - First Records"
SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree").NextPage
PreviousPage Method
Description
Scrolls the tree view to the previous page.
Syntax
object.PreviousPage
Return Type
None.
Example
'The following example uses the Previous Page method to navigate to the last
'record and then go to the previous page.
SiebApplication("Siebel Call Center").SiebMenu("Menu").Select "Navigate\\Navigate - Last Records"
SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree").PreviousPage
'The following example scrolls the tree view to the previous page.
SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("Opportunity Explorer").SiebApplet("Opportunities").SiebTree("Tree").PreviousPage
Select Method
Description
Selects a node in the tree view.
Syntax
object.Select (Position)
Arguments
| Parameter | Description |
|---|---|
| Position |
Required. A String value. The position of the node in the tree, in the format: first-level-position.second-level-position.third-level-position where each position is in relation to its current context within the preceding level. For example, 1.3.2 represents the second node within the third node of the first root node. |
Return Type
None.
Example
'The following example uses the Select method to select an item in a certain
'position in the tree and check whether the corresponding record is selected in
'the "Accounts" list.
Dim Active_Row, Active_Account_List, Col_Rep_Name, position
position = "1.6"
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
Accounts_Tree.Select position
Active_Row = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").ActiveRow
Col_Rep_Name = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetColumnRepositoryName("Account Name")
Active_Account_List = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts_2").SiebList("List").GetCellText(Col_Rep_Name, Active_Row)
If Active_Account_List = Accounts_Tree.ActiveTreeItem Then
Reporter.ReportEvent 0, "SiebTree", "Corresponding record is selected"
Else
Reporter.ReportEvent 1, "SiebTree", "Corresponding record is not being selected"
End If
ActiveTreeItem Property
Description
A data item representing the visible text of the current tree item.
Syntax
object.ActiveTreeItem
Value Type
A String value.
Property type
Read-only property
Example
'The following example uses the ActiveTreeItem property to navigate to the
'"Accounts" screen and select the "Explorer" view, then check whether the first
'item is selected by default.
Dim DefaultItem
Dim FirstItem
Set Accounts_Tree = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("Account Explorer").SiebApplet("Accounts").SiebTree("Tree")
DefaultItem = Accounts_Tree.ActiveTreeItem
FirstItem = Accounts_Tree.GetTreeItemName("1.1")
If FirstItem = DefaultItem Then
Reporter.ReportEvent 0, "SiebTree", "First Item is selected by default"
Else
Reporter.ReportEvent 1, "SiebTree", "First Item is not selected by default"
End If
ClassName Property
Description
The class of the object.
Syntax
object.ClassName
Value Type
A String value.
Property type
Read-only property
Example
'The following example uses the UIName and ClassName properties to display this
'information for all child objects of the Siebel Call Center application.
'Retrieve all the children of the siebel application object
Set MyDescription = Description.Create()
Set MyChildren = SiebApplication("Siebel Call Center").ChildObjects(MyDescription)
childCount = MyChildren.Count
'Display the UI names and classes for each object.
For i = 0 To childCount - 1
MsgBox MyChildren(i).UIName + " object of class " + MyChildren(i).ClassName
Next
RepositoryName Property
Description
The name of the object as it is stored in the repository.
Syntax
object.RepositoryName
Value Type
A String value.
Property type
Read-only property
UIName Property
Description
The name of the object as it appears in the user interface.
Syntax
object.UIName
Value Type
A String value.
Property type
Read-only property
Example
'The following example finds all the objects in the Daily Calendar with the same
'classname as a specified SiebPickList object and then displays the Repository
'name of each of these objects.
Set MyDescription = Description.Create()
MyDescription("classname").Value = SiebApplication("Siebel Call Center").SiebScreen("Home").SiebView("Siebel Web Call Center").SiebApplet("Daily Calendar").SiebPicklist("SiebPicklist").ClassName
Set MyChildren = SiebApplication("Siebel Call Center").SiebScreen("Home").SiebView("Siebel Web Call Center").SiebApplet("Daily Calendar").ChildObjects(MyDescription)
childCount = MyChildren.Count
' now we show test object names
For i = 0 To childCount - 1
MsgBox MyChildren(i).RepositoryName
Next
See also:
- SblAdvancedEdit
- SblButton
- SblCheckBox
- SblEdit
- SblPickList
- SblTable
- SblTabStrip
- SblTreeView
- SiebApplet
- SiebApplication
- SiebButton
- SiebCalculator
- SiebCalendar
- SiebCheckbox
- SiebCommunicationsToolbar
- SiebCurrency
- SiebInkData
- SiebList
- SiebMenu
- SiebPageTabs
- SiebPDQ
- SiebPicklist
- SiebRichText
- SiebScreen
- SiebScreenViews
- SiebTask
- SiebTaskAssistant
- SiebTaskLink
- SiebTaskStep
- SiebTaskUIPane
- SiebText
- SiebTextArea
- SiebThreadbar
- SiebToolbar
- SiebTree
- SiebView
- SiebViewApplets

