how u write vb script in qtp pls give me some basic script
and some material

Answer Posted / dhanapal

Some basic VB script functions

InStr Returns the position of the first occurrence of one
string within another. The search begins at the first
character of the string



InStrRev Returns the position of the first occurrence of
one string within another. The search begins at the last
character of the string



LCase Converts a specified string to lowercase



Left Returns a specified number of characters from the left
side of a string



Len Returns the number of characters in a string



LTrim Removes spaces on the left side of a string



RTrim Removes spaces on the right side of a string




Trim Removes spaces on both the left and the right side of
a string




Mid Returns a specified number of characters from a string




Replace Replaces a specified part of a string with another
string a specified number of times




Right Returns a specified number of characters from the
right side of a string




Space Returns a string that consists of a specified number
of spaces




StrComp Compares two strings and returns a value that
represents the result of the comparison




String Returns a string that contains a repeating character
of a specified length




StrReverse Reverses a string




UCase Converts a specified string to uppercase




Function



CreateObject Creates an object of a specified type



Eval Evaluates an expression and returns the result



GetLocale Returns the current locale ID




GetObject Returns a reference to an automation object from
a file




GetRef Allows you to connect a VBScript procedure to a
DHTML event on your pages




InputBox Displays a dialog box, where the user can write
some input and/or click on a button, and returns the
contents




IsEmpty Returns a Boolean value that indicates whether a
specified variable has been initialized or not




IsNull Returns a Boolean value that indicates whether a
specified expression contains no valid data (Null)




IsNumeric Returns a Boolean value that indicates whether a
specified expression can be evaluated as a number




IsObject Returns a Boolean value that indicates whether the
specified expression is an automation object




LoadPicture Returns a picture object. Available only on 32-
bit platforms




MsgBox Displays a message box, waits for the user to click
a button, and returns a value that indicates which button
the user clicked




RGB Returns a number that represents an RGB color value




Round Rounds a number




ScriptEngine Returns the scripting language in use




ScriptEngineBuildVersion Returns the build version number
of the scripting engine in use




ScriptEngineMajorVersion Returns the major version number
of the scripting engine in use




ScriptEngineMinorVersion Returns the minor version number
of the scripting engine in use




SetLocale Sets the locale ID and returns the previous
locale ID




TypeName Returns the subtype of a specified variable




VarType Returns a value that indicates the subtype of a
specified variable

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....

1418


How will you handle java tree in qtp?

619


How did you resolve conflicts present in Object Repository?

1609


what is the difference between modular framework & datadriven framework

1587


Explain features of the latest version of qtp/ uft 12.1?

591






Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?

1549


How many ways we can parameterize data in quicktest professional?

548


What are the key points to create a framework in QTP for oracle forms?

1797


What are the general steps involved in the data driven framework?

546


How many add-ins comes by default with qtp?

528


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1613


what is the difference betn QTP 8.0 AND PREVIOUS VERSION

1946


Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know

1395


wht type of User defined functions or Java Releated functions do we write in VB scripting

1815


What is the parameterization?

570