what is option explicit? what is the use of it?
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 ? | 62 Yes | 1 No |
Post New Answer View All Answers
What is quicktest professional?
What are the different recording modes and how do they work?
Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........
What are the views available in qtp?
How often were they executed?
For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?
What are the trigger events in qtp?
How to use output values in 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 ?
What are the ways you can synchronize?
whare exactly we have to use functions and sub routain
What are the steps involved in the recovery scenario wizard?
How you can write contexts to text file in qtp?
we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s.