Facebook

For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
New Schedule in MindQ Systems, Madhapur By SUDHAKAR
Course Name Date Time Duration Type Branch
Selenium+Appium 16th October 2017 7.30 AM - 9.00 AM IST 45 Days ClassRoom + Online Mind Q Madhapur
Selenium+Appium 30th October 2017 9.30 AM - 11.00 AM IST 45 Days ClassRoom + Online Mind Q Madhapur

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