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__())
def goto_logo(self): # 登录 return Login(self.driver)
def test_loginsuccess(self): self.logging.info("测试登录成功") login = Login(self.driver, self.url) login.login("test13", "123456")
def test_input_password(self): self.logging.info("测试输入密码") login = Login(self.driver, self.url) login.input_password("!@#$45GHH")
def test_input_username(self): self.logging.info("测试输入用户名") login = Login(self.driver, self.url) login.input_username("test!@#$%^&&个爱国")
def Login_T(self): return Login(self.driver)