Re: Manual VB script in QTP
Follwing are needs of vbscript for qtp automation. 1. Automation is guided by the record & playback tool like qtp, but there are limitations of the tool itself. 2. Checkpoints are one of the inbuilt feature of qtp that can be used and lot of manual vbscripting can be compromised, but at the same time qtp checkpoints do consume a lot of memory. You can go for the roproperty there vbscript comes to picture. 3. At times there are runtime validations on some rare controls (e.g. Webtable). ....where data needs to be parsed and then validated...vbscript not feasible by the recording feature. 4. Function libraries that are built using vbscript can be used adn aviod a lot of coding in the script. 5. Looping logics that are used against array of controls are guided by vbscript. 6. Efficient descriptive programming for fragile controls...vbscript. 7. If..then....else..........vbscript. 8. Numerical/string operations...vbscript. Well any automation tool if only recorded might not produce the best of validations, hence we use the assoicated language to achive optimal result. I hope experts would like to add details to the same. Regards, nawab
Re: Manual VB script in QTP
Hi.
[B]Reason 1:[/B]
If you have segments of code that you need to use several times in your tests, you may want to create a user-defined function. A user-defined function encapsulates an activity (or a group of steps that require programming) into a keyword (also called an operation). By using user-defined functions, your tests are shorter, and easier to design, read, and maintain. A function library is a Visual Basic script containing VBscript functions, subroutines, modules, and so forth.
[B]Reason 2[/B]
Some time you need to record particular step in the application in the middle of some script. In this case what you will do if you are following Recording Paradigm, you will definately open the application then bring the application at required state and then perform recording. Though you can do it through recording but it is a time consuming process. However you can do it if through VB scripting in a seconds if you have required Objects resides in Objcet Repositry.
[B][COLOR="Green"]SYCHO
Certified HP QuickTest Professional 9.2[/COLOR][/B]