When and why do you use "OPTION EXPLICIT" in VB Script.
Is there any online help or something to learn the script
for Beginners?
Answer Posted / ritesh mahendrakar
You can declare variables with the Dim, Public or the
Private statement. Like this:
Dim myname
myname = "ritesh"
However, this method is not a good practice, because you
can misspell the variable name later in your script, and
that can cause strange results when your script is running.
If you misspell for example the "myname" variable
to "mynime", the script will automatically create a new
variable called "mynime". To prevent your script from doing
this, you can use the 'Option Explicit' statement. This
statement forces you to declare all your variables with the
dim, public or private statement.
Put the Option Explicit statement on the top of your
script. Like this:
Option Explicit
Dim myname
myname = "ritesh"
| Is This Answer Correct ? | 16 Yes | 2 No |
Post New Answer View All Answers
can u please explain what is the exact difference between qtp8.2 and 9.0
Should have experience in framework means?
How to capture a window in QTP?
What is ObjectParamater?
For which type of projects the iterative model is not suitable?
What is the difference between a Function and Action in QTP?
To retrive the test data which tool vl use and whats basis u vl write test data? its urgent
tell me abt a time when u had to go above &beyind the call of duty to get the job done
What is the extension of the qtp local repository?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))
How do know the number of browsers opened?
Explain how qtp identifies objects?
How do you know the location Id of an object if you know its index id?
What is the expert view?
when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks