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 to create flat file datasubmission in qtp
What is checkpoint in qtp?
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
Can we access the java methods in qtp. Because my requirement is to access the swt(for eclipse an it is java code) methods in qtp is it possible?
I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com
What is a checkpoint? How many check points are there in qtp?
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?
Is it possible to merge two object repository files in qtp?
What is clean sweep?
what are the utilities and drivers
What is action split and the purpose of using this in qtp?
What are the steps involved in recovery scenario wizard?
What are the differences between quicktest professional and winrunner?
what is review
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?