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 Posted / jay prakash
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 |
Post New Answer View All Answers
What are the key points to create a framework in QTP for oracle forms?
Differentiate the type of test cases which can be automated and which cannot be automated?
There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?
There is an excel file of 1 to 100 sheets how you will iterate through it?
Can U Explain about QTP tool from older version to latest version also its differences?
www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example
after click on compose mail how can we attached a file in qtp with vbscript code
how to test use the quality control .how to verify the image verification
what is the difference betn QTP 8.0 AND PREVIOUS VERSION
What are the Application Functions available in QTP?
What is post recovery scenario?
am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)
Explain how Does Run time data (Parameterization) is handled in QTP?
How many types of parameters are available in quicktest professional?
How to use userdifined environment variables.Once we created in Environment tab which is at File--> Settings-- >Environment-->Userdifined