Forum Discussion

gabe1's avatar
gabe1
New Contributor
11 months ago

Workaround for MessageType when using Region.Check method

Hey.  I need to move away from Region.Compare to Region.Check because of some expected tolerance in pixel values and Region.Compare only has PixelTolerance and not ColorTolerance. However, Region.Ch...
  • gabe1's avatar
    11 months ago

    I ended up doing this, which works but it just feels really stupid that 2 core Test Complete functions that are seemingly the same take different arguments. 

    1. Change playback options so tests don't stop on error
    2. Create a new onError handler
    3. Inside this, stop the execution for the current test only

    function GeneralEvents_OnLogError(Sender, LogParams) {
       if (!LogParams.MessageText.includes('The region checkpoint')) {
          Runner.Stop(true)
       }
    }