SiebCurrency Object
Description
A currency calculator 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 SiebCurrency object.
Note: You can also view a list and descriptions of the SiebCurrency 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. |
ClosePopup | Closes the currency popup applet after saving changes. |
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. |
OpenPopup | Opens the currency calculator popup applet. |
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. |
SetText | Enters text in the text area. |
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
Amount | The value of the Amount field in the popup applet. |
ClassName | The class of the object. |
CurrencyCode | The value of the Currency Code field in the popup applet. |
ExchangeDate | The value of the Exchange Date field in the popup applet. |
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. |
IsRequired | Indicates whether the object is required. |
RepositoryName | The name of the object as it is stored in the repository. |
Text | The text value of the object. |
UIName | The name of the object as it appears in the user interface. |
ClosePopup Method
Description
Closes the currency popup applet after saving changes.
Syntax
object.ClosePopup
Return Type
None.
Example
'The following example uses the ClosePopup method to close the Currency 'calculator pop-up object, and then confirms that the value entered in the 'calculator contains the expected amount, currency code, and date. SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ClosePopup var_Text = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Text var_Amount = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Amount var_CurrencyCode = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").CurrencyCode var_ExchangeDate = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ExchangeDate If (var_Amount = var_Text And var_CurrencyCode = "USD" And Trim(var_ExchangeDate) = Trim(Date)) Then Reporter.ReportEvent 0, "SiebCurrency object. ", " Contains expected value" Else Reporter.ReportEvent 1, "SiebCurrency object. ", " Contains unexpected value" 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 uses the GetClassCount method to confirm that there is 'only one calculator control in the "Revenue" currency calculator, and then 'opens the calculator control and types a series of numbers into the 'calculator control. var_GetClassCount = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").GetClassCount("SiebCalculator") var_GetRepositoryName = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").GetRepositoryName("SiebCalculator", "Amount") If (var_GetClassCount = 1 And var_GetRepositoryName = "Amount") Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").OpenPopup SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKeys "11" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "=" 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. |
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 SiebCurrency object.
Example
'The following example uses the GetRepositoryName method to confirm that 'there is only one calculator control in the "Revenue" currency calculator, 'and then opens the calculator control and types a series of numbers into the 'calculator control. var_GetClassCount = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").GetClassCount("SiebCalculator") var_GetRepositoryName = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").GetRepositoryName("SiebCalculator", "Amount") If (var_GetClassCount = 1 And var_GetRepositoryName = "Amount") Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").OpenPopup SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKeys "11" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "0" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SiebCalculator("Amount").ClickKey "=" End If
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 ensure 'that an applet's first item has the repository name "Revenue" before 'opening the "Revenue" currency calculator pop-up. var_GetRepositoryNameByIndex = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").GetRepositoryNameByIndex("SiebCurrency", 0) If var_GetRepositoryNameByIndex = "Revenue" Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup End If
OpenPopup Method
Description
Opens the currency calculator popup applet.
Syntax
object.OpenPopup
Return Type
None.
Example
'The following example uses the OpenPopop method to open the "Revenue" 'currency calculator after confirming that it is not already open. var_IsOpen = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").IsOpen If Not var_IsOpen Then var_GetRepositoryNameByIndex = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").GetRepositoryNameByIndex("SiebCurrency", 0) If var_GetRepositoryNameByIndex = "Revenue" Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup End If End If
'The following example opens the currency popup and shows message boxes containing the amount, exchange date, and currency code values of the currency object SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Amount MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").CurrencyCode MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ExchangeDate
SetText Method
Description
Enters text in the text area.
Syntax
object.SetText (Text)
Arguments
Parameter | Description |
---|---|
Text |
Required. A String value. The text to enter. |
Return Type
None.
Example
'The following example uses the SetText method to enter text in a currency 'calculator after ensuring that it is enabled. var_IsEnabled = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").IsEnabled If var_IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SetText "Mercury Opportunity" End If
Amount Property
Description
The value of the Amount field in the popup applet.
Syntax
object.Amount
Value Type
A String value.
Property type
Read-only property
Example
'The following example opens the currency popup and shows message boxes containing the amount, exchange date, and currency code values of the currency object SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Amount MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").CurrencyCode MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ExchangeDate
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
CurrencyCode Property
Description
The value of the Currency Code field in the popup applet.
Syntax
object.CurrencyCode
Value Type
A String value.
Property type
Read-only property
Example
'The following example opens the currency popup and shows message boxes containing the amount, exchange date, and currency code values of the currency object SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Amount MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").CurrencyCode MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ExchangeDate
ExchangeDate Property
Description
The value of the Exchange Date field in the popup applet.
Syntax
object.ExchangeDate
Value Type
A String value.
Property type
Read-only property
Example
'The following example opens the currency popup and shows message boxes containing the amount, exchange date, and currency code values of the currency object SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Amount MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").CurrencyCode MsgBox SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ExchangeDate
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 ensure that the '"Revenue" currency calculator is enabled before entering a value in the 'calculator. var_IsEnabled = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").IsEnabled If var_IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SetText "Mercury Opportunity" End If
IsOpen Property
Description
Indicates whether the associated popup applet is open.
Syntax
object.IsOpen
Value Type
A long integer value.
Property type
Read-only property
Example
'The following example uses the IsOpen property to check whether the 'SiebCurrency pop-up object is already open, and if not, opens it. var_IsOpen = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").IsOpen If Not var_IsOpen Then var_GetRepositoryNameByIndex = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").GetRepositoryNameByIndex("SiebCurrency", 0) If var_GetRepositoryNameByIndex = "Revenue" Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").OpenPopup End If 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 '"Revenue" currency calculator is set as a required field and then attempts 'to enter an empty string in it. The example then confirms that a warning 'message opens when submitting an empty string in the required field. var_IsRequired = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").IsRequired SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").SetText "" SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebButton("New").Click var_Exist = Browser("Siebel Call Center").Dialog("Siebel").Exist If (var_IsRequired And var_Exist) Then Reporter.ReportEvent 0, "SiebCurrency object ", "behaves as expected for a required field." Else Reporter.ReportEvent 1, "SiebCurrency object ", "does not behave properly as a required field." End If Browser("Siebel Call Center").Dialog("Siebel").WinButton("OK").Click
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
Text Property
Description
The text value of the object.
Syntax
object.Text
Value Type
A String value.
Property type
Read-only property
Example
'The following example uses the Text property to confirm that the value 'entered in the calculator contains the expected amount. SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ClosePopup var_Text = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Text var_Amount = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").Amount var_CurrencyCode = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").CurrencyCode var_ExchangeDate = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebCurrency("Revenue").ExchangeDate If (var_Amount = var_Text And var_CurrencyCode = "USD" And Trim(var_ExchangeDate) = Trim(Date)) Then Reporter.ReportEvent 0, "SiebCurrency object. ", " Contains expected value" Else Reporter.ReportEvent 1, "SiebCurrency object. ", " Contains unexpected value" End If
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