← Back to team overview

sikuli-driver team mailing list archive

[Question #236003]: i am not able to display the region after find failed

 

New question #236003 on Sikuli:
https://answers.launchpad.net/sikuli/+question/236003

I have written logger class as mentioned on this link
 https://github.com/imikemo/Sikuli-and-Robot-Framework-Integration/blob/master/calctest/CalcLib/logger.py
when test case fails I am writing tat result to a file results.doc. My failed function looks like this

def failed(self, msg, *args, **kwargs):
      if self.isEnabledFor(logging.DEBUG):
             if len(getLastFoundImages()) != 0:
                    # source image
                    self.html_img("Source Image", common.cfgImageLibrary + '/' + getLastFoundImage())
      # screenshot
     self.screenshot()
    #addFoundImage("1")  #for forcing log to take screenshot of screen
    _lastFoundRegion = (0,0,1280,1024)
   # collectAllLogs()			
   if len(args) != 0:
          pass
   print "TestCase Failed"
   fout = open('Output\\Result.doc', 'w')
   fout.write("Find Failed   :  FAIL")
  fout.write("\n")
  getLastFoundRegion()
  raise common.VerificationFailed(msg)

I am not getting the scrrenshot and the region for failure. my sikuli wrapper class is similar to this link:
http://blog.mykhailo.com/2011/02/how-to-sikuli-and-robot-framework.html

I need to write into the Result.doc when failure occurs and also need to take a screenshot of the whole screen when FIND Failure occurs.

thanks in advance 

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.