QTP10.com is a new and completely free website that offers help in all the versions of HP QTP (including latest version 10). More importantly, it offers free code for users of HP QuickTest Professioal. This site helps you in learning the basics of QTP and descriptive/advanced programming in (QTP) on various environments like - .Net, Infragistics, Web, Windows, etc.
What is VBScript?
· VBScript is a scripting language
· A scripting language is a lightweight programming language
· VBScript is a light version of Microsoft's programming language Visual Basic
How Does it Work?
When a VBScript is inserted into a HTML document, the Internet browser will read the HTML and interpret the VBScript. The VBScript can be executed immediately, or at a later event.
How to Put VBScript Code in an HTML Document
<html>
<head>
</head>
<body>
<script type="text/vbscript">
document.write("Hello from VBScript!")
</script>
</body>
</html>
InStr Returns the position of the first occurrence of one string within another. The search begins at the first character of the string
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
Trim Removes spaces on both the left and the right side of a string
Other Functions
Function
Eval Evaluates an expression and returns the result
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
MsgBox Displays a message box, waits for the user to click a button, and returns a value that indicates which button the user clicked
No comments:
Post a Comment