Пример #1
0
 def test_05(self):
     """进入案件详情"""
     try:
         self.homepage.mediator_login(users.user_bafg['username'],
                                      users.user_bafg['pwd'])
         judgepage = JudgePage(self.homepage)
         judgepage.act_goto_case_detail()
     except Exception as msg:
         print "EXCEPTION >> {}".format(msg)
         # class function name_class docstring
         docstr = getdoc(
             getattr(self,
                     getframeinfo(currentframe()).function))
         name = _funcname_docstring(self, docstr.decode('utf8'))
         # 截图
         self.homepage.save_screen_shot(name)
         raise
     finally:
         self.end = datetime.datetime.now()
         duration = (self.end - self.start).seconds
         print "###case duration: {}###".format(duration)
Пример #2
0
 def test_05(self):
     """进入案件详情"""
     self.homepage.mediator_login(users.user_bafg['username'], users.user_bafg['pwd'])
     judgepage = JudgePage(self.homepage)
     judgepage.act_goto_case_detail()