Showing posts with label Capture Bitmap. Show all posts
Showing posts with label Capture Bitmap. Show all posts

Monday, September 3, 2012

Capture Bitmap Method in QTP


Capture Bitmap:

            This method is used to capture the image from the selected object. The captured image will be save in the given path in the bitmap (.bmp) format. Below syntax will show how to insert this (Capture Bitmap) property in to the script

Syntax:
Objhierarchy.Capturebitmap"filename.bmp",True

Example: Scripts to capture Google window:

Browser("Google").Capturebitmap "C:\name.bmp", True
'True is used to exist the image if it  is already present in the path
Browser("Google").Window("security Alert").Capturebitmap  "C:\filename.bmp",True

Capture a Desktop:
Desktop.Capturebitmap"D:\Desktop.bmp",True

Above are some of the sample scripts that describes the property of "Capture Bitmap"

Monday, August 20, 2012

QTP Methods


       QTP methods are used to extract the properties of a selected object in an application, There are some list of properties that comes under QTP methods,
  1. Capture Bitmap
  2. Child Objects
  3. GetRoProperty
  4. GetToProperty
  5. GetToProperties
  6. SetToProperty
  7. GetVisibleText
  8. GetItem
  9. GetContent
  10. GetItemsCount       
Note: The properties under 8, 9, 10 indicates the (List & Combobox) so using the above properties we can enhance the qtp scripts more effective as per the business requirements with respect to the project.