How to compare two images using QTP
But is there a other way we can compare?
Yes, we can use "IsEqualBin" method from Mercury.FileCompare
sImgPath1="C:\Users\user\Downloads\SAI 01461_exposure.JPG"
'sImgPath2="C:\Users\user\Downloads\SAI 01462_exposure.JPG"
sImgPath2="C:\Users\user\Downloads\SAI 0175_exposure.JPG"
Set obj=createobject("Mercury.FileCompare")
retVal=obj.IsEqualBin(sImgPath1,sImgPath2,1,1)
print retVal
Set obj=nothing
The retVal=1 if both the images are same
else retVal=0
No comments:
Post a Comment