예제 #1
0
파일: tt_selenium.py 프로젝트: boeai/mc
 def screen_shot(self, caseName):
     screen_shot_time = time.strftime('%H%M%S', time.localtime())
     screen_shot_name = caseName + "_" + screen_shot_time + ".png"
     screen_shot_fullname = os.path.join(log_dir, screen_shot_name)
     self.driver.get_screenshot_as_file(screen_shot_fullname)
     LOG.error("【异常】<a href='%s'>截图</a>" % screen_shot_fullname)
예제 #2
0
파일: tt_selenium.py 프로젝트: boeai/mc
 def get_screenshot(self, file_path):
     try:
         self.driver.get_screenshot_as_file(file_path)
         LOG.info("【截图】%s" % file_path)
     except Exception as msg:
         LOG.error("【截图】%s" % msg)