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
How to use the object spy in quicktest professional (qtp) 8.0 version?
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
Give the syntax to import/export xls into qtp.
How would you directly trigger javascript in a test?
Can an action have 2 shared object repositories associated with them? In that case, if two of them contain the same object, which one will be considered?
Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya
Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com
If I change the object name in one action will it be updated in all the actions? Or not?
how can i call function (which has link with excell sheet at a remote location) within another function
What should we say if interviewer asks "What is ur project architecture?".......Can any one help me with clear information.?????????
How will you compare keyword and expert view?
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.
What is the architecture of your project? Can any one answer for this question plz........
What are some test assets and related extensions of qtp?
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that