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
While writing script using For Next Statement in QTP, I try 
defining the variable in Lib File I am getting syntax error 
whereas if I use the variable in script file, the script 
works fine. Can anyone help me in finding the reason behind 
this?.
E:g

Dim intStartRow (Define in Lib File----- say abc.vbs)

Dim intRow (If I define this variable in Lib file I am 
getting Syntax error where as if I define in the script 
file ---- say xyz.mts the script works fine)

IntStartRow=2

For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count

‘Some Code here

Next
 Question Submitted By :: Anjulika Srivastava
I also faced this Question!!     Rank Answer Posted By  
 
  Re: While writing script using For Next Statement in QTP, I try defining the variable in Lib File I am getting syntax error whereas if I use the variable in script file, the script works fine. Can anyone help me in finding the reason behind this?. E:g Dim intStartRow (Define in Lib File----- say abc.vbs) Dim intRow (If I define this variable in Lib file I am getting Syntax error where as if I define in the script file ---- say xyz.mts the script works fine) IntStartRow=2 For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count ‘Some Code here Next
Answer
# 1
should be some simple error in ur declaration. Nothing big 
in this.

Do as below:

In Lib file, MyLib.vbs:
Dim i
i=10

In Script File
msgbox i

Include the lib file and run the script. No error.

If you can share the script i may be able to help u in 
identification of your error.
 
Is This Answer Correct ?    0 Yes 0 No
Jay Prakash
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
why we use environment variables  4
what is bultin funtaion in QTP &tell me five examples? Kanbay3
WE ARE PLANING TO DESIGN AUTOMATION FRAME WORK. HOW TO CALL CONFIGURATION SCRIPT FILE(.VBS) FROM DRIVE SCRIPT FILE(.VBS)  1
what we do after completion of functional and regression testing  2
Use of environment variables?  3
I have a drop down box to show selected number of records in result page.It contains 4 items like 10, 25,50 and 100. when i was recordes script for seelcting each item and checking selecting number of records in the result page( it is in the same page in the table format)it is generating a new page with same controls( objects) in the OR. how to avaid these in OR? is it possible to write DP for only these lines?, remaining(remaingin lines of code) objects i want use from OR only. One more problemis if change ( add /remove properties of an OBJECT in OR , my ( recorded )application is not running. Virtusa3
suppose there r 10 action in a test i want to execute action 5 to 10 how would i do that  1
how to use import and export sheet methods in qtp  1
how to capture tool tip in QTP and which check point is needed Syntel2
What is the Test Object model in QTP?  3
Which version of QTP is using by companies nowadays?  2
Hi, My problem is as follows. I recorded a script that created Object repository of each action i recorded. But later I added one more step (which was to enter data in a textfield) into the script through expert view. But as no repository for this newly added step exists in the test, my script fails. So please help me to sort this problem that how can I create object repository of a new step in an existing test. Thanks everyone  1
What is the vb script when the url enter into the browser Satyam1
In what situations QTP will not recognize the Objects? Wipro4
what is objectidentification?  2
How u send bugs to dev'lpment team all at once or one by one or waht is the process? kenexa2
when there is a task that gets repeated in multiple scripts what do you do in QTP? Ordain-Solutions2
How many type of status messages are there ..explain?  4
when do we write a script in qtp?(plz give me more then 2 reasons)  1
Pls answer this: What is the difference between a subroutine and a function? A. A subroutine can call itself; a function cannot B. A function returns a value; a subroutine cannot C. A function can accept arguments; a subroutine cannot. D. A subroutine can call other procedures; a function cannot.  1
 
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