How to use a snapshot captured by the spy?

Ask general questions here.
Thor222
Posts: 8
Joined: Mon Aug 30, 2010 4:59 pm

How to use a snapshot captured by the spy?

Post by Thor222 » Thu Sep 09, 2010 8:47 pm

I'm writing a branding test and I want to compare our logo with what’s shown in the browser.

I’ve used the spy to locate the logo and added to my repository.

I right-clicked on this repository item and chose "Caputure a sceen shot" and I now have a logo child element

I imagine the snapshot persists over time 'till I change it, so my test should simply call

Ranorex.Imaging.Compare( repo.logo, repo.logo.snapshot) and pass when they are the same.

But that doesn’t work.

What’s the right way to do this?

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: How to use a snapshot captured by the spy?

Post by artur_gadomski » Fri Sep 10, 2010 8:15 am

I haven't done any image comparison based testing yet but from what I know there is a difference between screenshot (image) and snapshot (Ranorex structure of UI). Maybe you're using the wrong one.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to use a snapshot captured by the spy?

Post by Support Team » Fri Sep 10, 2010 8:27 am

Hi,

The easiest way to do an image validation, is using the Ranorex Recorder in Image Based mode. Please take a look to following documentation http://www.ranorex.com/support/user-gui ... ation.html

If you want to do your Image Based Validation in code, please take a look to this documentation http://www.ranorex.com/support/user-gui ... ition.html

Regards,
Peter
Ranorex Team
.
Image

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: How to use a snapshot captured by the spy?

Post by sdaly » Fri Sep 10, 2010 12:47 pm