Compare bitmap file using QTP ( using Mercury.FileCompare object )
Hi All, We can use QTP in-build method for File compare with the help of Mercury.FileCompare. Here I am going to describe how to use that. Rem variable to store the location of the expected bitmap file strstoreBMPfile = “D:\rajivkumarnandvani.bmp” Rem variable to store the location of the actual bitmap file strActBMPfile = “D:\rajiv\runtimebmpfile.bmp” Rem Activate the window Window(“Flight Reservation”).Activate Rem Capture the actual bitmap image from the application during run-time Window(“Flight Reservation”).Static(“Static”).CaptureBitmap strActBMPfile , True Rem here True will overwrite the file Rem here we write the function for compare the bitmap file using qtp inbuild method Mercury.FileCompare. Rem Function FnCompareTwoBMPfiles Rem Description: this function Compares two bitmap images Rem input pathExpBMPfile path of Expected bmp file Rem input pathActBMPfile path of Actual bmp file Rem return value 1 if both file are same ; 0 if different Function FnCompar...