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
What does mean by Scope of Automation?n How we defined it?
What is text/text area checkpoint?
How to carry out bit map check points in QTP
How can i initiate the objects to find uniquely in OR
How will internal and external links be validated and updated? how often?
In what occasion we can specify global sheet and action sheet?
How to record application running on the Virtual machine?
if mandatory and Assitive propertys are shows same how will u write skript in QTP window
distinguish between old version and new version QTP features.
Can launch two instances of qtp on the same machine?
How many types of actions are there in quicktest professional (qtp)?
what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?
iam working in QTP for 2+ of exp if i attend the interview what r questions asked in perfomence testing{loadrunner} ? pls any one can say answer to this question?
How does you pass optional arguments in qtp?
How to save your test using quicktest professional (qtp)?