def test_createAutomainlineTaskTest(self): '''创建自主任务''' self.createAutomainlineTaskTest_verity(intoPlace=self.caseData.read_xlsxData("A2"), waybillNumber=self.caseData.read_xlsxData("B2"), destination=self.caseData.read_xlsxData("C2")) CreateAutomainlineTaskPage(self.driver).create_success() screenshot(self.driver, "生成自主任务成功")
def test_setting(self): '''站点设置''' self.setting_verify() # 定制手机无法调用uiautomator2,不能获取到toast # self.assertEqual(SettingPage(self.driver).setting_success(), "保存设置") self.assertEqual(SettingPage(self.driver).success_setting(), "登录") screenshot(self.driver, "保存站点设置")
def test_password_empty(self): '''密码为空''' self.login_verity(self.caseData.read_xlsxData('a3'), self.caseData.read_xlsxData('b3')) self.assertEqual(self.P.password_empty_verity(), "请输入密码!", msg="text判断有误") screenshot(self.driver, "密码为空")
def test_username_empty(self): '''用户名为空''' self.login_verity(self.caseData.read_xlsxData('a4'), self.caseData.read_xlsxData('b4')) self.P.username_empty_verity() self.assertEqual(self.P.username_empty_verity(), "请输入员工编号!", msg="text判断有误") screenshot(self.driver, "密码为空")
def test_correct_user_password(self): '''正确的账号和密码''' self.login_verity(self.caseData.read_xlsxData('a2'), self.caseData.read_xlsxData('b2')) # LoginPage(self.driver).correct_user_password_verity() self.assertEqual(self.P.correct_user_password_verity(), "主菜单", msg="text判断有误") screenshot(self.driver, "用户名密码正确")