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 is the XML file architecture ?
How to delete an object from the object repository?
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
What are the different types of functions available in qtp and explain ?
what is ODC and GDC?
What are the advantages of parameterization ?
What are the data types in qtp?
What are the key points to create a framework in QTP for oracle forms?
Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji
What is the difference between call to existing action and copy of an action?
What is difference between design time and run time data table?
What we are looking for is to load properties of object dynamically as for our application the global repository will pretty huge. It will be really helpful to us if something similar to following functions of Winrunner is available in QTP. #Define descriptor auto strDesc; #set property in the descriptor Gui_desc_set_attr(strDesc,?Class?,?Edit?); --- put other properties #Add Edit box to GUI Map Gui_add(? ?,strWindowName,strEditboxName,strDesc);
How to analyzing test results using quicktest professional (qtp)?
How to use reporter.report event in qtp ?