示例#1
0
 def test_operation_log_case(self):
     '''登录'''
     self.driver = chrome()
     lp = LoginPage(self.driver)
     username, password = ReadExcel('login')
     lp.login(username, password)
     #个人资料-修改个人资料-组织架构-添加架构-添加岗位-操作日志-查询出全部操作日志-删除其中一条操作日志
     hp3 = HomePage(self.driver)
     email, phone, expected = ReadExcel('my_data')
     hp3.homepage3(email, phone)
     sleep(2)
     #组织架构添加岗位
     op1 = OrPage(self.driver)
     rolename, branch_id, superiorposition_id, roledescription = read_data_excel(
         'addorgan')[1][3:7]
     op1.add_role(rolename, branch_id, superiorposition_id, roledescription)
     #点击头像-操作日志
     hp4 = HomePage(self.driver)
     hp4.homepage4()
     sleep(2)
     #查询全部类型的操作日志-删除一个操作日志
     olp = OperationLogPage(self.driver)
     olp.operationlogpage()
     hp4.alert_submit()
     sleep(2)
     #断言
     # expected = '成功删除了相关记录'
     actual = olp.assert_agin()
     self.assertIn(expected, actual, msg='删除操作日志失败')
示例#2
0
 def test_work_trend(self):
     '''登录'''
     lp = LoginPage(self.driver)
     username, password = ReadExcel('login')
     lp.login(username, password)
     #工作动态
     hp = HomePage(self.driver)
     searchform = ReadExcel('work_trend')
     hp.homepage(searchform)
     sleep(2)
     tp = TaskPage(self.driver)
     tp.taskpage()
     hp.alert_submit()
     #断言
     content = ReadExcel('content')
     tp.taskpage1(content)
     sleep(2)
     expected = '----暂无数据!----'
     actual = tp.search_assert()
     self.assertEqual(expected, actual, msg='删除任务失败')
     sleep(2)
示例#3
0
 def test_operation_log_case(self):
     '''登录'''
     lp = LoginPage(self.driver)
     username, password = ReadExcel('login')
     lp.login(username, password)
     #个人资料-修改个人资料-组织架构-添加架构-添加岗位-操作日志-查询出全部操作日志-删除其中一条操作日志
     hp3=HomePage(self.driver)
     email,phone=ReadExcel('my_data')
     hp3.homepage3(email,phone)
     sleep(2)
     #组织架构添加岗位
     #点击头像-操作日志
     hp4=HomePage(self.driver)
     hp4.homepage4()
     sleep(2)
     #查询全部类型的操作日志-删除一个操作日志
     olp=OperationLogPage(self.driver)
     olp.operationlogpage()
     hp4.alert_submit()
     sleep(2)
     #断言
     expected = '客户满意度调查'
     actual = olp.assert_agin()
     self.assertEqual(expected, actual, msg='添加公告失败')