GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP

 Print  |  
Question:  How do you compare two images in a web page using QTP



July 07, 2009 06:55:47 #2
 kapoor.riti   Member Since: July 2009    Total Comments: 2 

RE: How do you compare two images in a web page using QTP
 

function comparebitmap(actualbmp, expectedbmp)
set fcomapre=createobject("mercury.filecompare")
if fcomapre.isequalbin(actualbmp, expectedbmp,0,1)
then
          reporter.reportevent micpass,"Comparing Bitmap", actualbmp &"and" &expectedbmp &"are same"
          comparebitmap=true

else
         reporter.reportevent micpass,"Comparing Bitmap", actualbmp &"and" &expectedbmp &"are not same"
          comparebitmap=false

endif

comparebitmap("Path of actual bitmap","path of expected bitmap")

     

 

Back To Question