SiebApplication Object
Description
An application 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 SiebApplication object.
Note: You can also view a list and descriptions of the SiebApplication 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. |
GetBusyTime | Returns the time (in milliseconds) it took Siebel Application Client to become idle when the Siebel Application UI changed from standard- to high-interactivity. |
GetClassCount | Returns the number of objects of the specified type. |
GetLastErrorCode | Returns the last error code issued. |
GetLastErrorMessage | Returns the last error message issued. |
GetLastOpId | Returns the Id of the previous operation. |
GetLastOpTime | Returns the time (in milliseconds) it took to execute the previous operation. |
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. |
GetSessionId | Returns the Id of current session. |
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. |
GotoScreen | Navigates to the specified screen corresponding to the specified screen repository name. |
GotoView | Navigates to the top-level view corresponding to the specified view repository name. |
Output | Retrieves the current value of an item and stores it in a specified location. |
ProcessKeyboardAccelerator | Executes keyboard accelerators. |
RefreshObject | Instructs UFT One to re-identify the object in the application the next time a step refers to this object. |
SetTimeOut | Sets the maximum length of time (in seconds) that the test tool waits for the application to return from an operation before executing the next line of script. When timeout is exceeded, the test tool halts the script and displays an error. |
SetTOProperty | Sets the value of the specified description property in the test object description. |
Sync | Synchronizes the automation framework with the Siebel application. |
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. |
CurrentSiebScreen | Returns the test object corresponding to the screen that is currently active. |
CurrentSiebView | Returns the test object corresponding to the view that is currently active. |
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. |
GetBusyTime Method
Description
Returns the time (in milliseconds) it took Siebel Application Client to become idle when the Siebel Application UI changed from standard- to high-interactivity.
Syntax
object.GetBusyTime
Return Type
A long integer value.
IMPORTANT
The GetBusyTime method is executed asynchronously. That is, it is executed immediately after the previous statement, without waiting for the previous statement to complete. Therefore, an accurate response time is not returned by the GetBusyTime method until the previous operation and the GetBusyTime method have completed execution. For more information, see GetLastOpTime.
The GetBusyTime method is useful for measuring operations performed against standard-interactivity components within high-interactivity applications.
Example
'navigate to the Accounts screen SiebApplication("Siebel Call Center").GotoScreen "Accounts Screen" 'navigate to the Accounts list view inside Accounts screen SiebApplication("Siebel Call Center").GotoView "Account List View" ' show the application busy time and the last error that occurred MsgBox "The application busy time is " + CStr(SiebApplication("Siebel Call Center").GetBusyTime) MsgBox "The last error code is " + CStr(SiebApplication("Siebel Call Center").GetLastErrorCode) + " and the error message is " + SiebApplication("Siebel Call Center").GetLastErrorMessage
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 uses the GetClassCount method to return the number 'of PageTab objects in the "Siebel Universal Agent" application, and 'then writes this information to the run results. var_GetClassCount = SiebApplication("Siebel Universal Agent").GetClassCount("SiebPageTabs") Reporter.ReportEvent 2, "Method GetClassCount", " returns " & var_GetClassCount
GetLastErrorCode Method
Description
Returns the last error code issued.
Syntax
object.GetLastErrorCode
Return Type
A long integer value.
Example
'navigate to the Accounts screen SiebApplication("Siebel Call Center").GotoScreen "Accounts Screen" 'navigate to the Accounts list view inside Accounts screen SiebApplication("Siebel Call Center").GotoView "Account List View" ' show the application busy time and the last error that occurred MsgBox "The application busy time is " + CStr(SiebApplication("Siebel Call Center").GetBusyTime) MsgBox "The last error code is " + CStr(SiebApplication("Siebel Call Center").GetLastErrorCode) + " and the error message is " + SiebApplication("Siebel Call Center").GetLastErrorMessage
GetLastErrorMessage Method
Description
Returns the last error message issued.
Syntax
object.GetLastErrorMessage
Return Type
A String value.
Example
'navigate to the Accounts screen SiebApplication("Siebel Call Center").GotoScreen "Accounts Screen" 'navigate to the Accounts list view inside Accounts screen SiebApplication("Siebel Call Center").GotoView "Account List View" ' show the application busy time and the last error that occurred MsgBox "The application busy time is " + CStr(SiebApplication("Siebel Call Center").GetBusyTime) MsgBox "The last error code is " + CStr(SiebApplication("Siebel Call Center").GetLastErrorCode) + " and the error message is " + SiebApplication("Siebel Call Center").GetLastErrorMessage
GetLastOpId Method
Description
Returns the Id of the previous operation.
Syntax
object.GetLastOpId
Return Type
A String value.
Example
'The following example uses the GetLastOpId method to return the operation 'ID of the operation previously performed in the "Siebel Universal Agent" 'application, and then writes this information to the run results. var_GetLastOpId = SiebApplication("Siebel Universal Agent").GetLastOpId Reporter.ReportEvent 2, "Method GetLastOpId", " returns " & var_GetLastOpId
GetLastOpTime Method
Description
Returns the time (in milliseconds) it took to execute the previous operation.
Syntax
object.GetLastOpTime
Return Type
A long integer value.
IMPORTANT
The GetLastOpTime method is executed synchronously. That is, it is executed after the previous statement has completed execution. For more information, see GetBusyTime method.
The GetLastOpTime method is useful for measuring operations such as navigating to a screen, raising a popup applet, and selecting a menu item.
Example
'The following example uses the GetLastOpTime method to return the time '(in milliseconds) it took to execute the previous operation performed 'in the "Siebel Universal Agent" application, and then writes this 'information to the run results. var_GetLastOpTime = SiebApplication("Siebel Universal Agent").GetLastOpTime Reporter.ReportEvent 2, "Method GetLastOpTime", " returns " & var_GetLastOpTime
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. |
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 SiebApplication object.
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 uses the GetRepositoryNameByIndex method to return 'the repository name of the SiebScreen object with the index "0" in the '"Siebel Universal Agent" application, and then writes this information to 'the run results. var_GetRepositoryNameByIndex = SiebApplication("Siebel Universal Agent").GetRepositoryNameByIndex("SiebScreen", 0) Reporter.ReportEvent 2, "Method GetRepositoryNameByIndex ", " returns for SiebScreen " & var_GetRepositoryNameByIndex
GetSessionId Method
Description
Returns the Id of current session.
Syntax
object.GetSessionId
Return Type
A String value.
IMPORTANT
The returned string can be used to correlate the server-side Siebel ARM (Siebel Application Response Measurement) log files with the client operation Id. The Siebel ARM feature captures timing data useful for monitoring the performance of the Siebel application.
Example
'The following example uses the GetSessionId method to return the session 'ID of the current session in the "Siebel Universal Agent" application, 'and then writes this information to the run results. var_GetSessionId = SiebApplication("Siebel Universal Agent").GetSessionId 'SiebApplication("Siebel Universal Agent"). Reporter.ReportEvent 2, "Method GetSessionId", " returns " & var_GetSessionId
GotoScreen Method
Description
Navigates to the specified screen corresponding to the specified screen repository name.
Syntax
object.GotoScreen (Screen)
Arguments
Parameter | Description |
---|---|
Screen |
Required. A String value. The RepositoryName of the screen. |
Return Type
None.
Example
'navigate to the Accounts screen SiebApplication("Siebel Call Center").GotoScreen "Accounts Screen" 'navigate to the Accounts list view inside Accounts screen SiebApplication("Siebel Call Center").GotoView "Account List View" ' show the application busy time and the last error that occurred MsgBox "The application busy time is " + CStr(SiebApplication("Siebel Call Center").GetBusyTime) MsgBox "The last error code is " + CStr(SiebApplication("Siebel Call Center").GetLastErrorCode) + " and the error message is " + SiebApplication("Siebel Call Center").GetLastErrorMessage
GotoView Method
Description
Navigates to the top-level view corresponding to the specified view repository name.
Syntax
object.GotoView (ViewName)
Arguments
Parameter | Description |
---|---|
ViewName |
Required. A String value. The RepositoryName of the View object. |
Return Type
None.
Example
'navigate to the Accounts screen SiebApplication("Siebel Call Center").GotoScreen "Accounts Screen" 'navigate to the Accounts list view inside Accounts screen SiebApplication("Siebel Call Center").GotoView "Account List View" ' show the application busy time and the last error that occurred MsgBox "The application busy time is " + CStr(SiebApplication("Siebel Call Center").GetBusyTime) MsgBox "The last error code is " + CStr(SiebApplication("Siebel Call Center").GetLastErrorCode) + " and the error message is " + SiebApplication("Siebel Call Center").GetLastErrorMessage
ProcessKeyboardAccelerator Method
Description
Executes keyboard accelerators.
Syntax
object.ProcessKeyboardAccelerator (Keys)
Arguments
Parameter | Description |
---|---|
Keys |
Required. A String value. The accelerator keys to execute. |
Return Type
None.
Example
'The following example uses the ProcessKeyboardAccelerator method to press 'the CTRL+B accelerator keys in the "Siebel Universal Agent" application. SiebApplication("Siebel Universal Agent").ProcessKeyboardAccelerator "Ctrl+B"
SetTimeOut Method
Description
Sets the maximum length of time (in seconds) that the test tool waits for the application to return from an operation before executing the next line of script. When timeout is exceeded, the test tool halts the script and displays an error.
Syntax
object.SetTimeOut (NewTimeOutInSecs)
Arguments
Parameter | Description |
---|---|
NewTimeOutInSecs |
Required. A long integer value. The number of seconds to wait before timing out. |
Return Type
A long integer value.
Example
'The following example uses the SetTimeOut method to instruct Siebel 'to wait 10 seconds before returning an error from an operation. var_SetTimeOut = SiebApplication("Siebel Universal Agent").SetTimeOut(10)
Sync Method
Description
Synchronizes the automation framework with the Siebel application.
Syntax
object.Sync
Return Type
None.
Example
'The following example uses the Sync method to synchronize the automation 'framework with the "Siebel Universal Agent" application after the previous 'operation. var_GetTOProperty = SiebApplication("Siebel Universal Agent").GetTOProperty("classname") Reporter.ReportEvent 2, "Method GetTOProperty", " returns new value " & var_GetTOProperty SiebApplication("Siebel Universal Agent").Sync
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
CurrentSiebScreen Property
Description
Returns the test object corresponding to the screen that is currently active.
Syntax
object.CurrentSiebScreen
Value Type
An Object.
Property type
Read-only property
CurrentSiebView Property
Description
Returns the test object corresponding to the view that is currently active.
Syntax
object.CurrentSiebView
Value Type
An Object.
Property type
Read-only property
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 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