ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
what is option explicit? what is the use of it?
 Question Submitted By :: N
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is option explicit? what is the use of it?
Answer
# 1
Option explicit we declare at the top of the script so that
we can declare every variable as Dim or other data types.
Some times we do not declare variables, in that situation it
shows error if 'option explicit' is on in the script
 
Is This Answer Correct ?    3 Yes 2 No
Ravi Kumar Battula
 
  Re: what is option explicit? what is the use of it?
Answer
# 2
If we use 'Option Explicit', then we must declare the 
varible before we use.
If you dont declare the varible, then it returns an error 
message.

If you dont use 'Option Explicit' then no need of declaring 
the variables.
 
Is This Answer Correct ?    2 Yes 0 No
Uday Kumar_anem
 
 
 
  Re: what is option explicit? what is the use of it?
Answer
# 3
In VB script

option explicit forces the user to declare every variable
used in the code.

In VB Script is not mandatory to declare the variables.

VB script will be processed by windows scripthost.

Some time script host maynot haddle the undiclared 
variables.

so it is a good practice option explicit on the top of the 
script code.

once if u declare "option explicit" the each any every 
variable must be dicalred before using it in code.

other wise it fires an error nad not allow to run the 
script on Windows script host.

It is good coding practice to use "option explicit" on the 
top of the code.

byeee

Rajendra Prasad Reddy
rajendra_penumalli@yahoo.com
+919885162742
hyderabad
india
 
Is This Answer Correct ?    2 Yes 0 No
Rajendra
 
  Re: what is option explicit? what is the use of it?
Answer
# 4
If u are using Option Explicit, then variable declaration 
in vb script becomes compulsory/mandatory.of course 
Declaration is not mandatory in Vb script
 
Is This Answer Correct ?    0 Yes 0 No
Shanker
 
  Re: what is option explicit? what is the use of it?
Answer
# 5
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 ?    0 Yes 0 No
Ritesh Mahendrakar
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How u perform exception handling in QTp,what is other name for ths?  1
regular expression Wipro2
Hi. plz expalin abouit SetToProperty, SetRoProperty, GetToProperty, GetRoProperty,GetToPrperties. with examples.  3
Can you give me the code to calculate the total number of Links using the child object in the web page..? is there any other way to calculate number of links with out using the Child objects.?? DST-Global-Solutions2
Can we set a timeout for the msgbox.I want the msgbox to disappear after 2 seconds during the script execution without clicking on the OK button manually.  4
does QTP provides any tools for parametrisation?  3
Hi What are re-usable actions in QTP? -Thank You Siemens3
How to get data line by line from web element  1
Which MS Excel formulas are possible to use in the DataTable? I am searching a formula for searching a field in the datatable HP2
What is a Run-Time Data Table? Where can I find and view this table?  3
Will QTP gets installed on virtual PC.What is the maintenance number to be given  1
Write a user defined function to count the no. of buttons existed in a webpage ? i dont want to use descriptive.create () IBM4
what is the recovery scenario?  1
If some requirements r changed during the testing process ,then how can u handle this in frame work?  1
if you have the same application screen with 7 drop down boxes and approximately 70 values how do you test with QTP? Ordain-Solutions1
How QTP recognizes Objects in AUT? Blue-Star5
Hi This is tanya actually im facing problem in Qtp actully some time QTP doesnot recoznise the recorded object due to which script is going to fail.so can you tell me how we can handle this situation and i have another concerened issue is that at the time of run New errors comes every time so how we can handle this sitauation how we can add Recovery scenarios to the script.some time application runs successfully and some time it produces new error thats why i am facing lot of problem please give me the sugeestion as soon as possible.  2
what is vmodel?advantages and disadvantages of vmodel? AZTEC3
how to parameterise a test with data base table or excel sheet? FCG1
what is qtp automation framework, what is the purpose of the framework and which folders included in this framework pls tell me with brief description PSI-Data-Systems2
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com