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
how to test Web application using QTP software
Where can I find and view run-time data table?
Plz Explain How to access Or Store Script from VSS? Explain Real time work (qtp) where you store folders and next to how to you access that folders and how you maintain folders in VSS ? What are the Menu's in VSS? Suppose in Manual, by using Checkin Checkout u can access documents. how you access in QTp REal time?
How the exception handling can be done using quicktest professional?
When ‘option explicit’ keyword is used in qtp?
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]
what are the mandatory properties for a tex boxc (scenario?)
What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?
WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT
Where to use Property Let, Property Get, Property Set in UFT
Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji
How can I change object description or check point values in qtp?
Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.
hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?