Esempio n. 1
0
 def test_creatNewTask_isnull_run04(self):
     '''新建任务,任务名称为空'''
     self.login()
     me = ManualEntry(self.driver)
     me.clickMyTes()
     me.clickManualDetectButton()
     me.clickConfirmTaskBtn()
     try:
         self.assertTrue(me.isCreatAlertExist(), "-----没有错误提示-----")
         is_null_alert = me.getCreatTaskALert()
         self.assertEqual(is_null_alert, "任务名不能为空",
                          "-------任务名称为空未提示--------")
     finally:
         imagetest = getResultImage()
         imagetest.insert_image(self.driver, "creatNewTask_isnull.jpg")
         sleep(3)
Esempio n. 2
0
 def test_creatNewTask_overlong_run05(self):
     '''新建任务,任务名称过长'''
     self.login()
     me = ManualEntry(self.driver)
     me.clickMyTes()
     me.clickManualDetectButton()
     task_name = me.getOverLongName()
     me.inputCreatTaskBox(task_name)
     me.clickConfirmTaskBtn()
     try:
         self.assertTrue(me.isCreatAlertExist(), "-----没有错误提示-----")
         over_long_alert = me.getCreatTaskALert()
         self.assertEqual(over_long_alert, "任务名不能超过16位",
                          "-------任务名称过长未提示-------")
     finally:
         imagetest = getResultImage()
         imagetest.insert_image(self.driver, "creatNewTask_overlong.jpg")
         sleep(3)
Esempio n. 3
0
 def test_creatNewTask_sameName_run03(self):
     '''新建任务,任务名称重复'''
     self.login()
     me = ManualEntry(self.driver)
     me.clickMyTes()
     me.clickManualDetectButton()
     old_name = me.getSameName()
     me.inputCreatTaskBox(old_name)
     me.clickConfirmTaskBtn()
     try:
         self.assertTrue(me.isCreatAlertExist(), "-----没有错误提示-----")
         same_name_alert = me.getCreatTaskALert()
         self.assertEqual(same_name_alert, "您已创建过该任务;请重新创建或在已有任务中选择",
                          "-----名称重复未提示-----")
     finally:
         imagetest = getResultImage()
         imagetest.insert_image(self.driver, "creatNewTask_sameName.jpg")
         sleep(3)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)