-
Junior Member
An example of QTP scripts
I have basic understanding on QTP, vbscript and javascript. But i m not knowing where the scripting is used because record, run, data table parameter, wait property, syncro, if and loop statments can be directly added...where scripting is coming in picture? what is use of it? How it is used?
-
Expert Member
Re: An example of QTP scripts
1. when ever you are doing validations in your test you need to fetch data from the Object's in varying fashion as per your requirement...for eg:if your requirement to test the IE Window for some application that has title bar appended by the Account ID that is unique for an Individual, for testing that you need to parse the text of the title there comes SCRIPTING.
2. In specific case when-ever there are custom controls that are not identified uniquely by QTP we need to write Functions that do parsing of the Data and provide the requirement.
3. In Case there are some keyboard enabled events in your test, you are required to perform shell programming to trigger those event(shell scripts).
4. VBScript functions are used to filter the data that appears in the application for test purpose.
5. Regular Expressions are used to setup some parameterize checkpoints that are in case not Feasible with the QTP inbuilt Checkpoints.
6. In case you want to interact with the OTA of QTP or some integrated tools API's are processed and supported by VBScript..
Lot's more to be added...Thank's for starting this thread..hope there will be more addition's to the above list.
Regards,
Nawab
-
Banned
Re: An example of QTP scripts
-
Junior Member
Script fot capturing screen shots
Hi, am using a frame work which is written manually. can any one help me how to capture the screen shot when the error appears. i mean script
-
Expert Member
Re: An example of QTP scripts
hai zakaulla,
use this script
Dim path_error_file ' Declare a variable which contains path of the error image
path_error_file = "C:\Documents and Settings\Deepa\Desktop\error.bmp" ' Place the image on desktop
Browser("Browser").CaptureBitmap path_error_file,True ' Use CaptureBitmap method to capture the screenshot, True will overwrite an existing error.bmp file
Reporter.ReportEvent micFail,object_snap,"&"
Thanks
Deepa
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules