Forum Discussion

Chi's avatar
Chi
Occasional Contributor
7 years ago
Solved

Checking Region images without automatically having Checkpoint ticks and crosses in test log

My aim is to re-implement the following image check method into one that doesn't automatically post a Tick or Cross to the Test Log when Check passes or fails:     def original_image_check(self, i...
  • tristaanogre's avatar
    7 years ago

    I'm assuming there is actually a child object called "imgCoil" on icon?  You might want to double check that.  That's part of the problem.  Depending upon the timing of things, that object may not exist when you call your code.

     

    As for the other half, you need to change your code to the following:

    def new_image_check(self, icon=None):
       if icon is None:
          icon = self.frmMain.frmStatusBar.pnlPIFs.framePIF_right
       if not Regions.Compare("imgCoilCon", icon.imgCoil, False, False, True, 0, lmMessage):
          return False
       return True

    If you're going to use an item in your Regions collection, the parameter for that is a string that is the name of the Regions object that you want to use.