SiebApplet Object
Description
An applet 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 SiebApplet object.
Note: You can also view a list and descriptions of the SiebApplet 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. |
GetActiveControlName | Returns the name of the active control. |
GetClassCount | Returns the number of objects of the specified type. |
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. |
IsControlExists | Indicates whether the specified control 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. |
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. |
Exist | Checks whether the object currently exists in the open application. |
IsPopupApplet | Indicates whether the current applet represents a popup applet. |
RecordCounter | The visible text of the record counter string (for example: 1 - 7 of 7+). |
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. |
GetActiveControlName Method
Description
Returns the name of the active control.
Syntax
object.GetActiveControlName
Return Type
A String value.
Example
'The following example uses the GetActiveControlName method to retrieve the 'name of the active popup applet. SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebText("Parent Account Name").OpenPopup SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").SiebList("List").ActivateRow 8 var_popup = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").IsPopupApplet() var_activeControl = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").GetActiveControlName() If var_popup Then Reporter.ReportEvent 0, SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").UIName, "The applet is popup and its active control is" & var_activeControl Else Reporter.ReportEvent 0, SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").UIName, "The applet is not popup and its active control is" & var_activeControl End If
GetClassCount Method
Description
Returns the number of objects of the specified type.
Syntax
object.GetClassCount (ClassName)
Arguments
Parameter | Description |
---|---|
ClassName |
Required. A String value. The type of object to be counted. |
Return Type
A long integer value.
Example
'The following example checks whether any lists exists in the current applet. If so, a message displays the name of the first list. Dim itemCount itemCount = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").GetClassCount("SiebList") If (itemCount > 0) Then MsgBox SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").GetRepositoryNameByIndex("SiebList", 0) End If
GetRepositoryName Method
Description
Returns the RepositoryName of the object.
Syntax
object.GetRepositoryName (ClassName, UIName)
Arguments
Parameter | Description |
---|---|
ClassName |
Required. A String value. The ClassName of the child object. |
UIName |
Required. A String value. The UIName of the child object object. |
Return Type
A String value.
The repository name of the specified child object.
IMPORTANT
The specified object must be a direct child object of the SiebApplet object.
Example
'The following example uses the GetRepositoryName method to find the '"Account Name" field according to its UIName in the "Account" applet, 'and count the number of records with an empty value in the control. var_counter = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").recordcounter var_pickListRN = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").GetRepositoryName("SiebPicklist", "Account Type") emptycounter = 0 recordcounter = 0 While InStr(1, var_counter, "+", 1) SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebButton("GotoNextSet").Click If (SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").IsControlExists(var_pickListRN)) Then var_ItemValue = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebPicklist("micclass:=SiebPicklist", "repositoryname:=" & var_pickListRN).ActiveItem If Len(var_ItemValue) = 0 Then emptycounter = emptycounter + 1 End If End If var_counter = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").recordcounter recordcounter = recordcounter + 1 Wend Reporter.ReportEvent 0, "SiebApplet ", "The applet has "&emptycounter& "records with empty 'Account type' field from " & recordcounter& " records"
GetRepositoryNameByIndex Method
Description
Returns the RepositoryName of the item with the specified index.
Syntax
object.GetRepositoryNameByIndex (ClassName, Index)
Arguments
Parameter | Description |
---|---|
ClassName |
Required. A String value. The ClassName of the object. |
Index |
Required. A long integer value. The index of the object in the value returned by the GetClassCount method. |
Return Type
A String value.
Example
'The following example checks whether any lists exists in the current applet. If so, a message displays the name of the first list. Dim itemCount itemCount = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").GetClassCount("SiebList") If (itemCount > 0) Then MsgBox SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").GetRepositoryNameByIndex("SiebList", 0) End If
IsControlExists Method
Description
Indicates whether the specified control exists.
Syntax
object.IsControlExists (ControlName)
Arguments
Parameter | Description |
---|---|
ControlName |
Required. A String value. The RepositoryName of the control. |
Return Type
A long integer value.
Example
''The following example uses the IsControlExists method to check whether the '"Account Type" field exists in the applet, and then count the number of records ''with an empty value in the control. var_counter = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").recordcounter var_pickListRN = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").GetRepositoryName("SiebPicklist", "Account Type") emptycounter = 0 recordcounter = 0 While InStr(1, var_counter, "+", 1) SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebButton("GotoNextSet").Click If (SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").IsControlExists(var_pickListRN)) Then var_ItemValue = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebPicklist("micclass:=SiebPicklist", "repositoryname:=" & var_pickListRN).ActiveItem If Len(var_ItemValue) = 0 Then emptycounter = emptycounter + 1 End If End If var_counter = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").recordcounter recordcounter = recordcounter + 1 Wend Reporter.ReportEvent 0, "SiebApplet ", "The applet has "&emptycounter& "records with empty 'Account type' field from " & recordcounter& " records"
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
IsPopupApplet Property
Description
Indicates whether the current applet represents a popup applet.
Syntax
object.IsPopupApplet
Value Type
A long integer value.
Property type
Read-only property
Example
'The following example uses the IsPopupApplet property to check whether the '"Pick Account" applet is a popup applet. SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Accounts").SiebList("List").SiebText("Parent Account Name").OpenPopup SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").SiebList("List").ActivateRow 8 var_popup = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").IsPopupApplet() var_activeControl = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").GetActiveControlName() If var_popup Then Reporter.ReportEvent 0, SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").UIName, "The applet is popup and its active control is" & var_activeControl Else Reporter.ReportEvent 0, SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Pick Account").UIName, "The applet is not popup and its active control is" & var_activeControl End If
RecordCounter Property
Description
The visible text of the record counter string (for example: 1 - 7 of 7+).
Syntax
object.RecordCounter
Value Type
A String value.
Property type
Read-only property
Example
'The following example uses the RecordCounter property to enumerate through 'records in the "Account" applet and count the number of records with an 'empty "Account Type" field. var_counter = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").recordcounter var_pickListRN = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").GetRepositoryName("SiebPicklist", "Account Type") emptycounter = 0 recordcounter = 0 While InStr(1, var_counter, "+", 1) SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebButton("GotoNextSet").Click If (SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").IsControlExists(var_pickListRN)) Then var_ItemValue = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebPicklist("micclass:=SiebPicklist", "repositoryname:=" & var_pickListRN).ActiveItem If Len(var_ItemValue) = 0 Then emptycounter = emptycounter + 1 End If End If var_counter = SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").recordcounter recordcounter = recordcounter + 1 Wend Reporter.ReportEvent 0, "SiebApplet ", "The applet has "&emptycounter& "records with empty 'Account type' field from " & recordcounter& " records"
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
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
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 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
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