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
How qtp identifies objects?
Can we Test Welcome Screens and Process Images with QTP
How can you pass value one action to another action?
How to check bitmap output value?
can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?
Can launch two instances of qtp on the same machine?
Explain the concept of object repository and how QTP recognizes objects?
What is a Patch in QTP?
How to check feasibility of the appliction?in automation testing?
write the vb script for call to new action in qtp?
How to customize qtp?
What is the syntax to call one script from another? And what can be the syntax to call one “action” in another?
How do you capture tooltip using QTP?
How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?
what the difference between shared repository and per action repository?