Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bitmap Checkpoint
#2
Solved: 11 Years, 8 Months ago
I can suggest the following:

As soon as you click on the Menu also clcik on the print screen and see whether it captures the image also save it in a particular location.

Make sure you have a reference image to check with.
You can try below mentioned code for image verification.

Code:
Browser("Browser").Page("Page").WebTable("Table1").CaptureBitmap "c:\Temp1.jpg"
Browser("Browser").Page("Page").WebTable("Table2").CaptureBitmap "c:\Temp2.jpg"

Dim WshShell, oExec

Set WshShell = CreateObject("WScript.Shell")

Set oExec = WshShell.Exec("fc /b c:\temp1.jpg c:\temp2.jpg")

output = oExec.StdOut.ReadAll()

If Instr(1,output, "no differences in the two image", 1) Then
//  Pass Test
Else
// Fail Test
End If

I would say this is not the accurate method to check images through QTP. Also this might fail when run on the different machine because of
Screen resolution, color palette, vga, internal bit signatures may be different

If you like to compare all the image properties like color Pallate, darkness, brighness, hue etc.. then there is a method in dotnet library which compares the image. you need to use dotnetlibrary method to access the dll which will compare any two image file and produce the result.

Please 'dotnetlibrary' method as 'dotnetfactory' method
Reply


Messages In This Thread
Bitmap Checkpoint - by balaji4u - 06-30-2010, 11:46 AM
RE: Bitmap Checkpoint - by Tarik Sheth - 06-30-2010, 06:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  bitmap checkpoint ch_rk2004 0 1,701 07-16-2015, 05:15 PM
Last Post: ch_rk2004
  Capture tooltip text through bitmap checkpoint Nicklas 3 4,798 10-09-2012, 07:35 PM
Last Post: Brian.Osborne
  Bitmap Checkpoint is not recorded correctly hptrinh 1 2,784 04-11-2012, 07:55 PM
Last Post: hptrinh
  Bitmap Checkpoint nacchio 1 3,051 09-29-2011, 08:22 PM
Last Post: rajpes
  Bitmap Comparison Algorithm by creating Custom comparer remya 1 4,962 01-19-2011, 03:16 PM
Last Post: john

Forum Jump:


Users browsing this thread: 1 Guest(s)