def test_modifyCreatNewTask_isnull_run10(self): '''新建任务后,修改任务名称名为空的提示验证''' self.login() me = ManualEntry(self.driver) me.clickMyTes() me.clickManualDetectButton() task_name = me.getDifferName() me.inputCreatTaskBox(task_name) me.clickConfirmTaskBtn() me.clickModifyBtn() me.inputCreatTaskBox("") me.clickConfirmTaskBtn() same_name_alert = me.getCreatTaskALert() try: self.assertEqual(same_name_alert, "任务名不能为空", "-----任务名称为空未提示-----") finally: imagetest = getResultImage() imagetest.insert_image(self.driver, "modifyCreatNewTask_isnull.jpg") sleep(3)
def test_modifyCreatNewTask_samename_run09(self): '''新建任务后,修改任务名称名称重复的提示验证''' self.login() me = ManualEntry(self.driver) me.clickMyTes() me.clickManualDetectButton() task_name = me.getDifferName() me.inputCreatTaskBox(task_name) me.clickConfirmTaskBtn() me.clickModifyBtn() me.inputCreatTaskBox(task_name) me.clickConfirmTaskBtn() same_name_alert = me.getCreatTaskALert() try: self.assertEqual(same_name_alert, "您已创建过该任务;请重新创建或在已有任务中选择", "-----任务名称重复未提示-----") finally: imagetest = getResultImage() imagetest.insert_image(self.driver, "modifyCreatNewTask_samename.jpg") sleep(3)
def test_modifyCreatNewTask_succeed_run08(self): '''新建任务后,对任务名称进行修改''' self.login() me = ManualEntry(self.driver) me.clickMyTes() me.clickManualDetectButton() task_name = me.getDifferName() me.inputCreatTaskBox(task_name) me.clickConfirmTaskBtn() me.clickModifyBtn() modify_name = me.getDifferName() me.inputCreatTaskBox(modify_name) me.clickConfirmTaskBtn() confirm_name = me.getCreatTaskName() try: self.assertEqual(modify_name, confirm_name, "------修改任务名称失败--------") finally: imagetest = getResultImage() imagetest.insert_image(self.driver, "modifyCreatNewTask_succeed.jpg") sleep(3)