def test_repeatSelectExistingTasks_succeed_run11(self):
     '''选择已有任务,重新选择后,验证是否成功'''
     self.login()
     bd = BatchDetection(self.driver)
     bd.clickMyTes()
     bd.clickBatchDetectBtn()
     sleep(2)
     bd.clickChooseBtn()
     bd.clickDropDownBtn()
     bd.clickOldTaskchoise()
     bd.clickConfirmTaskBtn()
     bd.clickRechoiseBtn()
     try:
         self.assertTrue(bd.isRechoiseClickable(), "-----重新选择不可点击------")
         bd.clickDropDownBtn()
         rechoise_name = bd.clickSecendOldTaskchoise()
         bd.clickConfirmTaskBtn()
         confirm_name = bd.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 = BatchDetection(self.driver)
     me.clickMyTes()
     me.clickBatchDetectBtn()
     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)
 def test_selectExistingTasks_isnull_run07(self):
     '''不选择已有任务,直接点击'''
     self.login()
     me = BatchDetection(self.driver)
     me.clickMyTes()
     me.clickBatchDetectBtn()
     sleep(2)
     me.clickChooseBtn()
     me.clickConfirmTaskBtn()
     try:
         self.assertTrue(me.isOldAlertExist, "-----没有错误提示-----")
         is_null_alert = me.getOldTaskAlert()
         self.assertEqual(is_null_alert, "没有您输入的已有任务",
                          "-------选择已有任务失败-------")
     finally:
         imagetest = getResultImage()
         imagetest.insert_image(self.driver,
                                "selectExistingTasks_isnull.jpg")
         sleep(3)