How is the Instr function used in QTP?
How is the Instr function used in QTP?
Purpose: InStr is one of the most common string manipulation functions that you would be using in QTP. InStr function helps you determine if a smaller string is present in a bigger string or not. For example, you can use this function to determine if the string “Test” (smaller string) is present in “QuickTest” (bigger string).
How to create a reverse of a string in QTP?
String Function You can use the String function to create a repeating character string of a specified length. str = String(5, “a”) would return the string – “aaaaa”. StrReverse Function StrReverse function in QTP can be used to create a reverse of a string. For example, str = StrReverse(“orange”) would return the string – “egnaro”.
When to use TRIM function in QTP-XX?
Purpose: In QTP, Trim function can be used to remove the blank spaces from the beginning and end of a string. For example, Trim(” automation repository “) would return “automation repository”. So here, the function Trim removed all the blank spaces from the beginning and end of the string.
Can a VBScript function be used in QTP?
Purpose: This function can be used in QTP to find the length of a string. That is, this VBScript function finds out the number of characters present in a string. With this function, you can directly pass a string as an argument or you can pass a variable also. Example: Let us suppose that you want to create a random number in QTP of length 6.
What are the string functions in UFT / QTP?
String Functions ⇒Len Function Len : Returns the number of characters in a string or the number of bytes required to store a variable. string: Any valid string expression. If string contains Null, Null is returned. Varname: Any valid variable name. If varname contains Null, Null is returned. 1. Str=”Welcome to the World of QTP” 2.