SiebMenu Object
Description
A menu or menu item 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 SiebMenu object.
Note: You can also view a list and descriptions of the SiebMenu 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. |
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 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. |
GetUIName | Returns the UIName (display name in the user interface) of the object. |
IsEnabled | Indicates whether the specified object is enabled. |
IsExists | Indicates whether the specified object exists. |
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. |
Select | Selects a menu item from the Siebel application menu. |
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. |
GetRepositoryName Method
Description
Returns the RepositoryName of the object.
Syntax
object.GetRepositoryName (MenuItemUIName)
Arguments
Parameter | Description |
---|---|
MenuItemUIName |
Required. A String value. The UIName of the menu item. Submenu items are delimited by // (two forward slashes). |
Return Type
A String value.
The repository name of the specified menu item.
Example
' The following example displays a message box with the repository name of an item from the main menu. var_GetRepositoryNameByIndex = SiebApplication("Siebel Call Center").SiebMenu("Menu").GetRepositoryNameByIndex(2) var_GetUIName = SiebApplication("Siebel Call Center").SiebMenu("Menu").GetUIName (var_GetRepositoryNameByIndex) Msgbox SiebApplication("Siebel Call Center").SiebMenu("Menu").GetRepositoryName (var_GetUIName)
GetRepositoryNameByIndex Method
Description
Returns the RepositoryName of the item with the specified index.
Syntax
object.GetRepositoryNameByIndex (MenuIndex)
Arguments
Parameter | Description |
---|---|
MenuIndex |
Required. A long integer value. The index in the Count property of the object. |
Return Type
A String value.
The repository name of the specified menu item.
Example
'The following example uses the GetRepositoryNameByIndex method to find the 15th menu 'item and verify that its UI name matches the expected name. Set CallCenter_Menu = SiebApplication("Siebel Call Center").SiebMenu("Menu") NewRecord_RepName = CallCenter_Menu.GetRepositoryNameByIndex(15) If CallCenter_Menu.GetUIName(NewRecord_RepName) = "Edit\New Record " Then Reporter.ReportEvent 0, "UI Name", "UI Names match" Else Reporter.ReportEvent 1, "UI Name", "UI Names do not match" End If ' Showing the repository name of the "SiebMenu" item in the main menu var_GetRepositoryNameByIndex = SiebApplication("Siebel Call Center").SiebMenu("Menu").GetRepositoryNameByIndex(2) var_GetUIName = SiebApplication("Siebel Call Center").SiebMenu("Menu").GetUIName (var_GetRepositoryNameByIndex) Msgbox SiebApplication("Siebel Call Center").SiebMenu("Menu").GetRepositoryName (var_GetUIName)
GetUIName Method
Description
Returns the UIName (display name in the user interface) of the object.
Syntax
object.GetUIName (MenuItemRepName)
Arguments
Parameter | Description |
---|---|
MenuItemRepName |
Required. A String value. The RepositoryName of the object. |
Return Type
A String value.
Example
'The following example uses the GetUIName method to find the 15th menu item and verify 'that its UI name matches the expected name. Set CallCenter_Menu = SiebApplication("Siebel Call Center").SiebMenu("Menu") NewRecord_RepName = CallCenter_Menu.GetRepositoryNameByIndex(15) If CallCenter_Menu.GetUIName(NewRecord_RepName) = "Edit\New Record " Then Reporter.ReportEvent 0, "UI Name", "UI Names match" Else Reporter.ReportEvent 1, "UI Name", "UI Names do not match"
IsEnabled Method
Description
Indicates whether the specified object is enabled.
Syntax
object.IsEnabled (MenuItem)
Arguments
Parameter | Description |
---|---|
MenuItem |
Required. A String value. The RepositoryName of the Menu Item object. |
Return Type
A long integer value.
Example
'The following example uses the IsEnabled method to check whether the "New Record" 'applet menu item is enabled. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" Set CallCenter_Menu = SiebApplication("Siebel Call Center").SiebMenu("Menu") NewRecord_RepName = CallCenter_Menu.GetRepositoryNameByIndex(15) If CallCenter_Menu.IsExists(NewRecord_RepName) And CallCenter_Menu.IsEnabled(NewRecord_RepName) Then SiebApplication("Siebel Call Center").SiebMenu("Menu").Select NewRecord_RepName SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebText("Account Name").SetText "New Account Record" Else Reporter.ReportEvent 1, "Sieb Menu", "Items is not enabled or Exists" End If
IsExists Method
Description
Indicates whether the specified object exists.
Syntax
object.IsExists (MenuItem)
Arguments
Parameter | Description |
---|---|
MenuItem |
Required. A String value. The RepositoryName of the object. |
Return Type
A long integer value.
Example
'The following example uses the IsExists method to check whether the "New Record" 'applet menu item exists. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" Set CallCenter_Menu = SiebApplication("Siebel Call Center").SiebMenu("Menu") NewRecord_RepName = CallCenter_Menu.GetRepositoryNameByIndex(15) If CallCenter_Menu.IsExists(NewRecord_RepName) And CallCenter_Menu.IsEnabled(NewRecord_RepName) Then SiebApplication("Siebel Call Center").SiebMenu("Menu").Select NewRecord_RepName SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebText("Account Name").SetText "New Account Record" Else Reporter.ReportEvent 1, "Sieb Menu", "Items is not enabled or Exists" End If
Select Method
Description
Selects a menu item from the Siebel application menu.
Syntax
object.Select (MenuItem)
Arguments
Parameter | Description |
---|---|
MenuItem |
Required. A String value. The RepositoryName of the Menu Item object. |
Return Type
None.
Example
'The following example uses the Select method to select the "New Record" applet menu 'item if it exists and is enabled. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" Set CallCenter_Menu = SiebApplication("Siebel Call Center").SiebMenu("Menu") NewRecord_RepName = CallCenter_Menu.GetRepositoryNameByIndex(15) If CallCenter_Menu.IsExists(NewRecord_RepName) And CallCenter_Menu.IsEnabled(NewRecord_RepName) Then SiebApplication("Siebel Call Center").SiebMenu("Menu").Select NewRecord_RepName SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebText("Account Name").SetText "New Account Record" Else Reporter.ReportEvent 1, "Sieb Menu", "Items is not enabled or Exists" 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 count the number of items in a menu, 'then check that the number of disabled and enabled menu items matches the total number 'of menu items. Dim EnabledItems Dim DisabledItems Dim ItemsInMenu EnabledItems = 0 DisabledItems = 0 Set CallCenter_Menu = SiebApplication("Siebel Call Center").SiebMenu("Menu") ItemsInMenu = CallCenter_Menu.Count For i = 1 To ItemsInMenu ItemInList = CallCenter_Menu.GetRepositoryNameByIndex(i) If CallCenter_Menu.IsEnabled(ItemInList) Then EnabledItems = EnabledItems + 1 Else DisabledItems = DisabledItems + 1 End If Next If EnabledItems + DisabledItems = ItemsInList Then Reporter.ReportEvent 0, "Sieb Menu", "The Disabled and Enabled Items match the total Items in list" Else Reporter.ReportEvent 1, "Sieb Menu", "The Disabled and Enabled Items do not match the total Items in list" 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