SiebText Object
Description
A text box 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 SiebText object.
Note: You can also view a list and descriptions of the SiebText 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. |
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. |
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. |
SetText | Enters text into the text box. |
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. |
IsEnabled | Indicates whether the object is enabled. |
IsEncrypted | Indicates whether the text value of the object is masked, such as in a password text box. |
IsRequired | Indicates whether the object is required. |
PopupType | The type of popup associated with the text box. |
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. |
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 text box, this key is usually the Enter key. |
Return Type
None.
Example
'The following example enters an address in an account text field and presses enter. SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebText("Address Line 2").SetText "10 Hitchcock Street" SiebApplication("Siebel Call Center").SiebScreen("Accounts").SiebView("My Accounts").SiebApplet("Account").SiebText("Address Line 2").ProcessKey "EnterKey"
SetText Method
Description
Enters text into the text box.
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 text box 'after ensuring that the text box is enabled. var_IsEnabled = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").IsEnabled If var_IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").SetText "Mercury Opportunity" End If
ClassName Property
Description
The class of the object.
Syntax
object.ClassName
Value Type
A String value.
Property type
Read-only property
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 '"OpportunityName" text box is enabled before entering text in the text box. var_IsEnabled = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").IsEnabled If var_IsEnabled Then SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").SetText "Mercury Opportunity" End If
IsEncrypted Property
Description
Indicates whether the text value of the object is masked, such as in a password text box.
Syntax
object.IsEncrypted
Value Type
A long integer value.
Property type
Read-only property
Example
'The following example uses the IsEncrypted property to confirm that the '"Opportunity Name" text box does not contain an encrypted value. var_IsEncrypted = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").IsEncrypted If var_IsEncrypted Then Reporter.ReportEvent 1, "SiebText object, check encrypted ", "Returns unexpected encrypted value." Else Reporter.ReportEvent 0, " SiebText object, check encrypted ", "The value is not encrypted, as expected." 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 '"Opportunity Name" text box is set as a required field and then attempts to 'enter an empty string in the text box. 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").SiebText("Opportunity Name").IsRequired SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").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, "SiebText object ", "behaves as expected for a required field." Else Reporter.ReportEvent 1, "SiebText object ", "does not behave properly as a required field." End If Browser("Siebel Call Center").Dialog("Siebel").WinButton("OK").Click
PopupType Property
Description
The type of popup associated with the text box.
Syntax
object.PopupType
Value Type
A String value.
Property type
Read-only property
Example
'The following example uses the PopupType property to confirm that the '"Opportunity Name" text box is not a SVPick pop-up type text box. var_PopupType = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").PopupType If var_PopupType = "Text" Then Reporter.ReportEvent 0, " SiebText object, check popup ", "The object is not a pop-up object, as expected." Else Reporter.ReportEvent 1, " SiebText object, check popup ", "Returns unexpected pop-up type." 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
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 '"Opportunity Name" text box contains the expected text value. var_Text = SiebApplication("Siebel Call Center").SiebScreen("Opportunities").SiebView("My Opportunities").SiebApplet("Opportunity").SiebText("Opportunity Name").Text If var_Text = "Mercury Opportunity" Then Reporter.ReportEvent 0, "SiebText object, 'text' property ", "Returns expected value." Else Reporter.ReportEvent 1, "SiebText object, 'text' property ", "Does not return expected 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