SiebPicklist Object
Description
A pick list 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 SiebPicklist object.
Note: You can also view a list and descriptions of the SiebPicklist 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. |
GetItemByIndex | Returns the visible text of the picklist item.Index = the index (starting at zero) of the object in the Count property. |
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. |
IsExists | Indicates whether the specified picklist item exists. |
Output | Retrieves the current value of an item and stores it in a specified location. |
ProcessKey | Processes the specified key. |
RefreshObject | Instructs UFT One to re-identify the object in the application the next time a step refers to this object. |
Select | Selects an item from the picklist. |
SetText | Enters text in the picklist control (for example, when composing a query). |
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
ActiveItem | A data value (from the associated list of values) representing the currently selected item. |
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. |
IsEnabled | Indicates whether the object is enabled. |
IsOpen | Indicates whether the associated popup applet is open. This property is used in objects that have a popup applet. |
IsRequired | Indicates whether the object is required. |
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. |
GetItemByIndex Method
Description
Returns the visible text of the picklist item.Index = the index (starting at zero) of the object in the Count property.
Syntax
object.GetItemByIndex (Index)
Arguments
Parameter | Description |
---|---|
Index |
Required. A long integer value. The index of the item in the Count property. |
Return Type
A String value.
Example
'The following example uses the GetItemByIndex method to enumerate through 'the items in the "Status" picklist, select each item in turn and verify the 'results by comparing the expected and active items. var_count = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Count For i = 0 To var_count - 1 var_NextItem = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").GetItemByIndex(i) SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Select (var_NextItem) var_ActiveItem = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").ActiveItem If var_NextItem = var_ActiveItem Then Reporter.ReportEvent 0, var_ObjectSring, "behaves as expected for selection : " & var_NextQuery & " on position " & i Else Reporter.ReportEvent 1, var_ObjectSring, "does not behave properly for selection: " & var_NextQuery & " on position " & i End If Next
IsExists Method
Description
Indicates whether the specified picklist item exists.
Syntax
object.IsExists (LOVItem)
Arguments
Parameter | Description |
---|---|
LOVItem |
Required. A String value. The visible title of the PDQ or Picklist object. |
Return Type
A long integer value.
Example
'The following example uses the IsExists method to select the "Customers" 'item from a programmatically created SiebPicklist object after checking 'whether the item exists. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" If SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsExists("Customers") Then SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").Select "Customers" Else Reporter.ReportEvent 1, "SiebPickList", "does not have Customers Item in the list" End If
ProcessKey Method
Description
Processes the specified key.
Syntax
object.ProcessKey (Key)
Arguments
Parameter | Description |
---|---|
Key |
Required. A String value. The key to invoke. In a pick list this key is usually the Enter key. |
Return Type
None.
Example
' The following example makes sure that an associated applet is closed and then sets "30%" in the discount list If Not (SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").IsOpen) Then SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").SetText "30%" SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").ProcessKey "EnterKey" End If
Select Method
Description
Selects an item from the picklist.
Syntax
object.Select (LOVItem)
Arguments
Parameter | Description |
---|---|
LOVItem |
Required. A String value. The visible text of the picklist item. |
Return Type
None.
Example
'The following example uses the Select method to check whether the "Status" 'picklist is enabled and is a required field, and then select it. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" If SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsRequired And SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Select "Contract Pending" Else Reporter.ReportEvent 1, "SiebPickList", "Is not as expected" End If
SetText Method
Description
Enters text in the picklist control (for example, when composing a query).
Syntax
object.SetText (Text)
Arguments
Parameter | Description |
---|---|
Text |
Required. A String value. The text to enter in the text area. |
Return Type
None.
IMPORTANT
The SetText method fails on picklists that are used as applet toggle controls.
Example
' The following example makes sure that an associated applet is closed and then sets "30%" in the discount list If Not (SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").IsOpen) Then SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").SetText "30%" SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").ProcessKey "EnterKey" End If
ActiveItem Property
Description
A data value (from the associated list of values) representing the currently selected item.
Syntax
object.ActiveItem
Value Type
A String value.
Property type
Read-only property
Example
'The following example uses the ActiveItem property to enumerate through the 'items in the "Status" picklist, select each item in turn, and compare the 'active item with the expected item. var_count = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Count For i = 0 To var_count - 1 var_NextItem = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").GetItemByIndex(i) SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Select (var_NextItem) var_ActiveItem = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").ActiveItem If var_NextItem = var_ActiveItem Then Reporter.ReportEvent 0, var_ObjectSring, "behaves as expected for selection : " & var_NextQuery & " on position " & i Else Reporter.ReportEvent 1, var_ObjectSring, "does not behave properly for selection: " & var_NextQuery & " on position " & i End If Next
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 the number of items 'in the "Status" picklist, select each item in turn, and compare the active 'item with the expected item. var_count = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Count For i = 0 To var_count - 1 var_NextItem = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").GetItemByIndex(i) SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Select (var_NextItem) var_ActiveItem = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").ActiveItem If var_NextItem = var_ActiveItem Then Reporter.ReportEvent 0, var_ObjectSring, "behaves as expected for selection : " & var_NextQuery & " on position " & i Else Reporter.ReportEvent 1, var_ObjectSring, "does not behave properly for selection: " & var_NextQuery & " on position " & i End If Next
IsEnabled Property
Description
Indicates whether the object is enabled.
Syntax
object.IsEnabled
Value Type
A long integer value.
Property type
Read-only property
Example
'The following example uses the IsEnabled property to check whether the '"Status" picklist is enabled and a required field. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" If SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsRequired And SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Select "Contract Pending" Else Reporter.ReportEvent 1, "SiebPickList", "Is not as expected" End If
IsOpen Property
Description
Indicates whether the associated popup applet is open. This property is used in objects that have a popup applet.
Syntax
object.IsOpen
Value Type
A long integer value.
Property type
Read-only property
Example
' The following example makes sure that an associated applet is closed and then sets "30%" in the discount list If Not (SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").IsOpen) Then SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").SetText "30%" SiebApplication("Siebel Call Center").SiebScreen("Sales Orders").SiebView("My Sales Orders").SiebApplet("Sales Order").SiebPicklist("Discount").ProcessKey "EnterKey" End If
IsRequired Property
Description
Indicates whether the object is required.
Syntax
object.IsRequired
Value Type
A long integer value.
Property type
Read-only property
Example
'The following example uses the IsRequired property to check whether the '"Status" picklist is enabled and a required field. SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoScreen "Accounts Screen" SiebApplication("Siebel Call Center").SiebPageTabs("PageTabs").GotoView "Account List View" If SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsRequired And SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("ClassName:=SiebPickList", "UIName:=Status").IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebPicklist("Status").Select "Contract Pending" Else Reporter.ReportEvent 1, "SiebPickList", "Is not as expected" 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