Facebook

For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
Course Name Date Time Duration Type Location
Selenium 4 + Cucumber BDD 27th November 2019 7.00 AM IST to 8:30 AM IST 40 Days WeekDays Online

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Wednesday, June 24, 2009

Compare Two bitmaps using QTP

Dim pTitle

'***************************************************
Function CompareBitmap(ActualBmp, ExpectedBmp)


 Set fCompare = CreateObject("Mercury.FileCompare")


 If fCompare.IsEqualBin(ExpectedBmp, ActualBmp, 0, 1) Then

   Reporter.ReportEvent micPass,"Bitmap Verification",ActualBmp&"and"&ExpectedBmp&" are same"
   CompareBitmap=True
 Else
   Reporter.ReportEvent micFail,"Bitmap Verification",ActualBmp&"and"&ExpectedBmp&" are not same"
   CompareBitmap=False  
 End If


End Function
'***************************************************
'Calling the Function
CompareBitmap "C:\act.bmp", "C:\exp.bmp"
'***************************************************
____________________________________________________________


Please send your Suggestions and Doubts to my yahoo group http://in.groups.yahoo.com/group/qtpsudhakar

No comments :

Post a Comment