def test_unselect(self):
     '''不选择任何专业'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.delete()
     self.assertEqual(s.reason(), "请选择一条数据")
     function.screenshot(self.driver, "spcial_unselect.jpg")
 def test_multiselect(self):
     '''选择两个专业'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.multi_select()
     s.modify()
     self.assertEqual(s.reason(), "只能选择一条数据")
     function.screenshot(self.driver, "special_multiselect.jpg")
예제 #3
0
 def test_special_delete(self):
     '''删除专业'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.delete_obj()
     self.assertEqual(s.result(), "您确定要删除这条信息吗")
     s.confirm()
     self.assertEqual(s.result(),  "删除成功")
     function.screenshot(self.driver, "delete_special.jpg")
 def test_back(self):
     '''修改专业并返回'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.modify_obj()
     self.assertEqual(s.sub_tagname(), "企业专业表-修改")
     s.name_clear()
     s.add_special("Update")
     s.add_back()
     function.screenshot(self.driver, "modify_special_back.jpg")
 def test_special_add_error(self):
     '''输入为空'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.add()
     self.assertEqual(s.sub_tagname(), "企业专业表-新增")
     s.add_save()
     self.assertEqual(s.error_name(), "不能为空哦")
     self.assertEqual(s.error_company(), "不能为空哦")
     function.screenshot(self.driver, "add_special_blank.jpg")
예제 #6
0
 def test_special_delete_cancle(self):
     '''取消删除专业'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     a = s.name_list()
     s.delete_obj()
     self.assertEqual(s.result(), "您确定要删除这条信息吗")
     s.cancel()
     self.assertEqual(s.name_list(),  a)
     function.screenshot(self.driver, "delete_special_cancle.jpg")
예제 #7
0
 def test_special_add(self):
     '''添加专业'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.add()
     self.assertEqual(s.sub_tagname(), "企业专业表-新增")
     s.add_special(Data.specialname)
     s.select_company()
     s.add_save()
     function.screenshot(self.driver, "add_special.jpg")
 def test_special_modify_error(self):
     '''输入为空'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.modify_obj()
     self.assertEqual(s.sub_tagname(), "企业专业表-修改")
     s.name_clear()
     s.add_save()
     self.assertEqual(s.error_name(), "不能为空哦")
     function.screenshot(self.driver, "modify_special_blank.jpg")
 def test_modify_name(self):
     '''修改专业名'''
     s = specialmanage(self.driver)
     s.open_specialmanage()
     self.assertEqual(s.verify(), True)
     s.modify_obj()
     self.assertEqual(s.sub_tagname(), "企业专业表-修改")
     self.assertEqual(s.company_status(), False)
     s.name_clear()
     s.add_special("Update")
     s.add_save()
     function.screenshot(self.driver, "modify_special_name.jpg")