Forum Discussion

ianlop's avatar
ianlop
Occasional Contributor
11 months ago

Alternatives to Check method logging error

Hello,

I would like to use the regions check property on an if statement, but noticed that if the check property returns false it halts the test automatically after logging the error. I do not want to modify my playback options to not stop a test on Log Error. Instead, I just want the same functionality that the check does but to return a true or false depending on the check. Not an error log.
I have stored an image and a mask on what I want to focus on, but the image to compare that to is gathered at run time.
Any suggestions?
Code (in python):

 

3 Replies

    • ianlop's avatar
      ianlop
      Occasional Contributor

      I do not do the logging, it is Regions.(name).Check(...) that does the error logging if it fails the property check. I would like to just return false and not log an error.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    There doesn't seem to be any alternative, apart from changing the project settings to continue on error. And it's not possible to use try...catch statement.