SiebToolbar Object
Description
A toolbar 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 SiebToolbar object.
Note: You can also view a list and descriptions of the SiebToolbar 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. |
Click | Clicks a toolbar item. |
GetRepositoryName | Returns the RepositoryName of the object. |
GetRepositoryNameByIndex | Returns the RepositoryName of the item with the specified index. |
GetROProperty | Returns the current value of the specified description property from the object in the application. |
GetTOProperties | Returns the value of the specified description property from the test object description. |
GetTOProperty | Returns the value of the specified description property from the test object description. |
Highlight | Highlights the object in the application. |
GetUIName | Returns the UIName (display name in the user interface) of the object. |
IsControlEnabled | Indicates whether the specified control is enabled. |
IsControlExists | Indicates whether the specified control exists. |
Output | Retrieves the current value of an item and stores it in a specified location. |
RefreshObject | Instructs OpenText Functional Testing to re-identify the object in the application the next time a step refers to this object. |
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
ClassName | The class of the object. |
Count | The number of objects of a given type that are present in the current context. |
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. |
Click Method
Description
Clicks a toolbar item.
Syntax
object.Click (ItemName)
Arguments
Parameter | Description |
---|---|
ItemName |
Required. A String value. The RepositoryName of the toolbar item. |
Return Type
None.
Example
'The following example uses the Click method to click the "Site Map" 'toolbar button and then check the state of the "Execute Query" toolbar 'button. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Web Call Center Home Screen" SiebApplication("Siebel Call Center").SiebToolbar("HIMain").Click "SiteMap" NewQuery_RepName = SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetRepositoryNameByIndex(0) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlExists(NewQuery_RepName) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlEnabled(NewQuery_RepName) Then Reporter.ReportEvent 1, "SiebToolBar", "Execute Query Toolbar button is Enabled" Else Reporter.ReportEvent 0, "SiebToolBar", "Execute Query Toolbar button is disabled as expected " End If End If
GetRepositoryName Method
Description
Returns the RepositoryName of the object.
Syntax
object.GetRepositoryName (ItemUIName)
Arguments
Parameter | Description |
---|---|
ItemUIName |
Required. A String value. The UIName of the toolbar item. |
Return Type
A String value.
The repository name of the specified toolbar item.
Example
'The following example uses the GetRepositoryName method to check whether 'the repository name of the "Execute Query" toolbar button matches its 'displayed UI name. ItemUI_Name = SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetUIName("HIMain") If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetRepositoryName(ItemUI_Name) = ItemUI_Name Then Reporter.ReportEvent 0, "SiebToolBar", "Object Repository matches the UI Name " Else Reporter.ReportEvent 1, "SiebToolBar", "Object Repository doesn't match the UI Name " End If
GetRepositoryNameByIndex Method
Description
Returns the RepositoryName of the item with the specified index.
Syntax
object.GetRepositoryNameByIndex (Index)
Arguments
Parameter | Description |
---|---|
Index |
Required. A long integer value. The index in the Count property of the object. |
Return Type
A String value.
Example
'The following example uses the GetRepositoryNameByIndex method to check 'whether the toolbar button with the repository name index of '0' exists 'and is enabled. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Web Call Center Home Screen" SiebApplication("Siebel Call Center").SiebToolbar("HIMain").Click "SiteMap" NewQuery_RepName = SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetRepositoryNameByIndex(0) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlExists(NewQuery_RepName) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlEnabled(NewQuery_RepName) Then Reporter.ReportEvent 1, "SiebToolBar", "Execute Query Toolbar button is Enabled" Else Reporter.ReportEvent 0, "SiebToolBar", "Execute Query Toolbar button is disabled as expected " End If End If
GetUIName Method
Description
Returns the UIName (display name in the user interface) of the object.
Syntax
object.GetUIName (ItemRepositoryName)
Arguments
Parameter | Description |
---|---|
ItemRepositoryName |
Required. A String value. The RepositoryName of the object. |
Return Type
A String value.
Example
'The following example uses the GetUIName method to check whether the UI 'name of the "Execute Query" toolbar button matches its repository name. ItemUI_Name = SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetUIName("HIMain") If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetRepositoryName(ItemUI_Name) = ItemUI_Name Then Reporter.ReportEvent 0, "SiebToolBar", "Object Repository matches the UI Name " Else Reporter.ReportEvent 1, "SiebToolBar", "Object Repository doesn't match the UI Name " End If
IsControlEnabled Method
Description
Indicates whether the specified control is enabled.
Syntax
object.IsControlEnabled (ItemRepositoryName)
Arguments
Parameter | Description |
---|---|
ItemRepositoryName |
Required. A String value. The RepositoryName of the object. |
Return Type
A long integer value.
Example
'The following example uses the IsControlEnabled method to check whether 'the "Execute Query" toolbar button is disabled when clicking on the '"Site Map" toolbar button. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Web Call Center Home Screen" SiebApplication("Siebel Call Center").SiebToolbar("HIMain").Click "SiteMap" NewQuery_RepName = SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetRepositoryNameByIndex(0) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlExists(NewQuery_RepName) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlEnabled(NewQuery_RepName) Then Reporter.ReportEvent 1, "SiebToolBar", "Execute Query Toolbar button is Enabled" Else Reporter.ReportEvent 0, "SiebToolBar", "Execute Query Toolbar button is disabled as expected " End If End If
IsControlExists Method
Description
Indicates whether the specified control exists.
Syntax
object.IsControlExists (ItemRepositoryName)
Arguments
Parameter | Description |
---|---|
ItemRepositoryName |
Required. A String value. The RepositoryName of the object. |
Return Type
A long integer value.
Example
'The following example uses the IsControlExists method to check whether 'the "Execute Query" toolbar button exists but is disabled when clicking 'on the "Site Map" toolbar button. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Web Call Center Home Screen" SiebApplication("Siebel Call Center").SiebToolbar("HIMain").Click "SiteMap" NewQuery_RepName = SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").GetRepositoryNameByIndex(0) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlExists(NewQuery_RepName) If SiebApplication("Siebel Call Center").SiebToolbar("HIQuery").IsControlEnabled(NewQuery_RepName) Then Reporter.ReportEvent 1, "SiebToolBar", "Execute Query Toolbar button is Enabled" Else Reporter.ReportEvent 0, "SiebToolBar", "Execute Query Toolbar button is disabled as expected " End If 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
Count Property
Description
The number of objects of a given type that are present in the current context.
Syntax
object.Count
Value Type
A long integer value.
Property type
Read-only property
Example
'The following example uses the Count property to find and display the 'number of items in the "SearchCenter" toolbar. Dim SearchOptions_Num Set Search_Toolbar = SiebApplication("Siebel Call Center").SiebToolbar("SearchCenter") SearchOptions_Num = Search_Toolbar.Count If SearchOptions_Num = 1 Then Reporter.ReportEvent 0, "SiebToolBar", "1 search option is displayed" Else Reporter.ReportEvent 1, "SiebToolBar", " " & SearchOptions_Num & " options are displayed" End If
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