def test_06_user_login_phonenumEmpty(self): """ 手机号为空登录""" logging.info('==手机号为空登录==') login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 6) login.login_action(data[0], data[1]) self.assertTrue(login.check_login_fail_status())
def test_08_user_login_DeactivatedAccount(self): """停用账号登录""" logging.info('==停用账号登录==') login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 8) login.login_action(data[0], data[1]) self.assertTrue(login.check_login_fail_status())
def test_05_user_login_unregistered(self): """未注册账号登录""" logging.info('==未注册账号登录==') login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 5) login.login_action(data[0], data[1]) self.assertTrue(login.check_login_fail_status())
def test_03_user_login_pwdempty(self): """密码为空登录""" logging.info('==正常账号密码为空登录==') login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 3) login.login_action(data[0], data[1]) self.assertTrue(login.check_login_fail_status())
def test_01_user_login(self): """正常登录用例""" logging.info('==正常账号成功登录用例==') login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 1) login.login_action(data[0], data[2]) self.assertTrue(login.check_login_success_status())
def test_02_user_login_pwderr(self): """密码错误登录用例""" logging.info('==正确账号密码错误登录=') login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 2) login.login_action(data[0], data[1]) self.assertTrue(login.check_login_fail_status()) self.assertTrue(login.check_toast_text('精臣进销存:用户名或密码错误'))
def test_login_action(self): if self.param == 0: login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 1) login.login_action(data[0], data[2]) else: login = LoginBusiness(self.driver) data = login.get_csv_data('../data/test_data/login_data.csv', 1) login.login_action(data[0], data[2])
def login_action(self): login = LoginBusiness(self.driver) data = login.get_csv_data('../data/product_data/login_data.csv', 1) login.login_action(data[0], data[2])