Forum Discussion

berni's avatar
berni
New Contributor
13 years ago

Picture.Difference (TestComplete V6.53)

The Difference method is working correctly when using just ONE parameter



But in this code example


sub test

  set p1 = Utils.Picture

  set p2 = Utils.Picture

  p1.LoadFromFile("chkMt.curr.png")

  p2.LoadFromFile("chkMt.stor.png")


  set p3 = p2.Difference(p1,false,100)

  if p3 is nothing then

    log.message "images are identical"

  else

    log.error "images differ!"

    log.picture p3

  end if

end sub



the method Difference returns an object although the differences are less then 100 (excactly: 6).



What's wrong with my coding?



Berni

1 Reply

  • Hi,


    Your code is right. It looks like the method works incorrectly in your version of TestComplete. However, this method works correctly in the current TestComplete version - 8.70. So, you can solve your problem by upgrading to the latest version.