Forum Discussion

goran_gasparini's avatar
goran_gasparini
New Contributor
15 years ago

Regions.Compare

During a simple region comparation i have serveral problems

1. comparation files sometimes

2. needed to create different stored images for IE and FF



As you can see from the code below, sStoredImage contains a portion of sCurrentImage , which is an image object i get from a web application



my function is :



 if regions.FindRegion(sStoredImage,sCurrentImage,0,0,true,false,25) is nothing then

  log.Picture(sCurrentImage ),"Actual Image: "

  log.Picture(regions.GetPicture(sStoredImage)),"Expected Image: "

 else

  isImageCorrect=true

 end if





What could be the problem? Is it possible that the behavior is different using IE or FF!



Thanx

  • Hi goran,





    1. comparation files sometimes


    I recommend that you see the "Why Image Comparison Fails" help topic - it contains some useful advice for this case.





    2. needed to create different stored images for IE and FF


    This is expected, because Internet Explorer and Firefox use different rendering engines, so there are differences in pages' drawing methods.