Returns A zero-based, one-dimensional array containing a specified number of substrings.
This function splits the string that was originally concatenated with a particular string and gets a one-dimensional array.
5,ubound
Returns the largest available subscript for the indicated dimension to an array.
Gets the maximum value for a dimension.
6,trim
Returns a copy of a string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (T RIM).
You can use the LTrim function if you need to remove all the spaces to the left of the string, or you can use the RTrim function if you need to remove all the spaces to the right of the string. You can use the TRIM function if you need to remove all the spaces to the left and right of the string.
7,ucase
Returns A string that has been converted to uppercase.
This function converts all characters to a corresponding capitalization.
8,lcase
Returns A string that has been converted to lowercase.
This function converts all characters to the corresponding lowercase.
9,cstr
Returns An expression this has been converted to a Variant of subtype String.
Since VBScript has only one type variant, you can use this function to cast a variable to a string type.
10,cint
Returns An expression this has been converted to a Variant of subtype Integer.
Since VBScript has only one type variant, you can use this function to cast a variable to an integer type.
In descriptive programming statements, the most commonly used functions are:
11,create
This is the method that you must use to create a class or object.
12,childobjects
Use this method to get a collection of objects of a class that meet certain criteria.
13,count
Use this method to get the number of objects of a class that meet certain criteria.
The following example uses the Create method to return a Properties collection object named Editdescription, and then The returned object to instruct QuickTest to enter the Text:myname in the the ' the ' the ' the ' the ' the ' the ' the ' the ' the ' Webedit With the name UserName.
Set Editdesc = Description.create ()
Editdesc ("Micclass"). Value = "Webedit"
Editdesc ("Name"). Value = "UserName"
Set Lists = Browser ("Welcome:mercury"). Page ("Welcome:mercury"). Childobjects (EDITDESC)
Numberoflists = Lists.count ()
If numberoflists > 0 Then
Browser ("Welcome:mercury"). Page ("Welcome:mercury"). Lists (0). Set "MyName"
End If
Some specific usages can be found in QTP's help. Personal advice is: you'd better follow the example provided in QTP, use these functions yourself to write a few lines of statements, run after a look at the results of the operation, combined with QTP help inside the instructions, so that the study will be quick, also remember firmly.
When outputting the results, the commonly used functions are Msgbox and Print functions. The Msgbox function is available in QTP8.2 and above, the Print function needs to be used on the QTP 9.2 version, QTP 8.2 does not support this function, and it is not known whether QTP 9.0 supports this function.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.