Hi,
Try to use below code:-

Dim actualbmp,expectedbmp
actualbmp=CaptureBitmap_Example
Browser("man").Page("Login"),"C:\actualbitmap"
expectedbmp=CaptureBitmap_Example
Browser("man").Page("Login"),"C:\actualbitmap1"

CompareBitmap actualbmp, expectedbmp

Function CaptureBitmap_Example(Obj,strfileName)
Obj.capturebitmap  strfileName & ".png"
CaptureBitmap_Example=strfileName & ".png"
End Function

Function CompareBitmap(actualbmp, expectedbmp)
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("fc /b"&actualbmp&" "&expectedbmp)
output = oExec.StdOut.ReadAll()
If Instr(1,output, "no differences encountered", 1) Then
MsgBox "Success"
Else
MsgBox "Failure"
End If
End Function

Thanks & Regards,
Manjeet Singh




On Thu, Feb 11, 2010 at 2:15 PM, Anamika aaa <[email protected]> wrote:

> hi ,
>
> can anyone please tell me how to compare the image files with different
> background but the image is similar using QTP.
>
>
> Regards,
> anamika
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to