def test_position01(self):
     """新增职务"""
     position = PositionPage(self.driver)
     position.add_positon("自动测试系统","测试科")
     try:
         message =position.get_message()
         self.assertEqual("保存成功!",message)
     except Exception as e:
         position.get_windows_img()
         raise e
 def test_position06(self):
     """分配权限"""
     self.driver.refresh()
     time.sleep(2)
     position = PositionPage(self.driver)
     position.assign_privelege("自动化测试系统")
     try:
         message = position.get_message()
         self.assertEqual("分配权限成功!", message)
     except Exception as e:
         position.get_windows_img()
         raise e
 def test_position05(self):
     """分配用户"""
     self.driver.refresh()
     time.sleep(2)
     position = PositionPage(self.driver)
     position.assign_user("自动化测试系统","cyl")
     try:
         message = position.get_peizhi()
         self.assertEqual("已配置", message)
     except Exception as e:
         position.get_windows_img()
         raise e
 def test_position04(self):
     """编辑职务"""
     self.driver.refresh()
     time.sleep(2)
     position = PositionPage(self.driver)
     position.edit_position("自动测试系统","自动化测试系统")
     try:
         message = position.get_message()
         self.assertEqual("保存成功!", message)
     except Exception as e:
         position.get_windows_img()
         raise e
 def test_position03(self):
     """通过所属单位进行查询"""
     self.driver.refresh()
     time.sleep(2)
     position = PositionPage(self.driver)
     position.query_danwei()
     try:
         message = position.get_list()
         self.assertEqual("自动测试系统", message)
     except Exception as e:
         position.get_windows_img()
         raise e