def test_repeatSelectExistingTasks_succeed_run11(self): '''选择已有任务,重新选择后,验证是否成功''' self.login() me = ManualEntry(self.driver) me.clickMyTes() me.clickManualDetectButton() sleep(2) me.clickChooseBtn() me.clickDropDownBtn() me.clickOldTaskchoise() me.clickConfirmTaskBtn() me.clickRechoiseBtn() try: self.assertTrue(me.isRechoiseClickable(), "-----重新选择不可点击------") me.clickDropDownBtn() rechoise_name = me.clickSecendOldTaskchoise() me.clickConfirmTaskBtn() confirm_name = me.getCreatTaskName() self.assertEqual(rechoise_name, confirm_name, "-----重新选择已有任务失败-----") finally: imagetest = getResultImage() imagetest.insert_image(self.driver, "repeatSelectExistingTasks_succeed.jpg") sleep(3)
def test_selectExistingTasks_succeed_run02(self): '''选择已有任务成功''' self.login() me = ManualEntry(self.driver) me.clickMyTes() me.clickManualDetectButton() sleep(5) me.clickChooseBtn() me.clickDropDownBtn() old_name = me.clickOldTaskchoise() me.clickConfirmTaskBtn() confirm_name = me.getCreatTaskName() try: self.assertEqual(old_name, confirm_name, "-----选择已有任务失败-----") finally: imagetest = getResultImage() imagetest.insert_image(self.driver, "selectExistingTasks_succeed.jpg") sleep(3)