Пример #1
0
 def setUpClass(cls) -> None:
     cls.case_id = cls.__name__
     lg = Login()
     try:
         cls.driver = lg.login()
     except Exception as e:
         if lg.driver:
             lg.driver.quit()
         assert 0, "{} 登录失败! 原因: {}".format(cls.case_id, e.__str__())
Пример #2
0
 def _initial(self):
     self.case_id = self.__class__.__name__
     lg = Login()
     try:
         self.driver = lg.login()
     except Exception as e:
         if lg.driver:
             lg.driver.quit()
         assert 0, "{} 登录失败! 原因: {}".format(self.case_id, e.__str__())