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
Hi How to retrieve data from web element line by line?
What are the different types of action?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
What is the expert view?
What are the recording modes in qtp?
terminal services client
How to find operating system information using the qtp script?
When you open QTP, how many sheets you can see?
Can we write winrunner language i.e TSL in QTP tool?
What is the differences between image check point and bit map check point?
What is quicktest professional (qtp window?
Hi we are running tests remotely from quality center and pushing tests into qtp boxes remotely, and it does execution but while uploading results back into quality center it hangs in qtp box.If any one come across similar problem, please send me details how to handle this. Thanks kris
What is the use of sendkeys and what are send keys
What is the architecture of your project? Can any one answer for this question plz........
What are the ways you can synchronize?