Hi Michel,

It works perfectly..
Thanks for the reply...

Regards
Durgesh.

--- On Tue, 26/5/09, Michael Hwee <michael_h...@yahoo.com> wrote:

From: Michael Hwee <michael_h...@yahoo.com>
Subject: [wtr-general] Re: How can I compare the captured web pages
To: watir-general@googlegroups.com
Date: Tuesday, 26 May, 2009, 10:59 PM

if first == second
  puts "same"
else
  puts "not the same"
end





From: Durgesh Nadkarni <fordurg...@yahoo.co.in>
To: watir-general@googlegroups.com
Sent: Monday, May 25, 2009 3:12:39 AM
Subject: [wtr-general] Re: How can I compare the captured web pages





Hi Michael,

Thank you for the reply. I was busy with other stuff so replying after few days.

Can you give me sample code or syntax for comparing two images once I had both 
the images in md5 hash format?

So I will first take both the images keyword.jpg & newimage.jpg in the same way 
by capturing them through screen_capture method and then would go for hash 
comparison.

Please let me know on above.

Thanks & Regards
Durgesh.


--- On Fri, 8/5/09, Michael Hwee <michael_h...@yahoo.com> wrote:


From: Michael Hwee <michael_h...@yahoo.com>
Subject: [wtr-general] Re: How can I compare the captured web pages
To: watir-general@googlegroups.com
Date: Friday, 8 May, 2009, 8:44 PM






Instead of comparing the image to image, you can use MD5 key comparision.
Here is an example.


require 'digest/md5'


first = Digest::MD5.hexdigest(File.read("keywords.jpg"))


second = Digest::MD5.hexdigest(File.read("NewImage.jpg"))


Compare that two md5 hash.


Michael




From: Durgesh Nadkarni <durgeshnadka...@gmail.com>
To: watir-general@googlegroups.com
Sent: Friday, May 8, 2009 4:13:17 AM
Subject: [wtr-general] How can I compare the captured web pages

Hi,

I have used following method to capture the image of a web page
screen_capture("keywords.jpg",true)

Then I have captured the one more page.

Now I want to compare both the pages. 

What method can I use?

Also how can I compare a specific portion of a page with other page?

Please update me on above

Thanks & Regards
Durgesh.








Explore and discover exciting holidays and getaways with Yahoo! India Travel 
Click here!










      Explore and discover exciting holidays and getaways with Yahoo! India 
Travel http://in.travel.yahoo.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to