def test_fm_class_management(cls, data, expect): FinancialManagement(cls.driver).fm_class_management() if Service.is_element_present(cls.driver, By.LINK_TEXT, '班级管理'): actual = 'FM_correct' else: actual = 'FM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_am_return(cls, data, expect): AdministrativeManagement(cls.driver).am_return_interface() if Service.is_element_present(cls.driver, By.LINK_TEXT, '归还记录'): actual = 'AM_correct' else: actual = 'AM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_fm_monthly_accounting(cls, data, expect): FinancialManagement(cls.driver).fm_monthly_accounting() if Service.is_element_present(cls.driver, By.LINK_TEXT, '月度核算'): actual = 'FM_correct' else: actual = 'FM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_em_corporate_clients(cls, data, expect): EmploymentManagement(cls.driver).em_corporate_clients() if Service.is_element_present(cls.driver, By.LINK_TEXT, '企业客户'): actual = 'EM_correct' else: actual = 'EM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_em_orientation_information(cls, data, expect): EmploymentManagement(cls.driver).em_orientation_information() if Service.is_element_present(cls.driver, By.LINK_TEXT, '入职信息'): actual = 'EM_correct' else: actual = 'EM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_em_interview_records(cls, data, expect): EmploymentManagement(cls.driver).em_interview_records() if Service.is_element_present(cls.driver, By.LINK_TEXT, '面试记录'): actual = 'EM_correct' else: actual = 'EM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_pm_attendance_records(cls, data, expect): PersonnelManagement(cls.driver).pm_attendance_records() if Service.is_element_present(cls.driver, By.LINK_TEXT, '考勤记录'): actual = 'PM_correct' else: actual = 'PM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)
def test_pm_recipients(cls, data, expect): PersonnelManagement(cls.driver).pm_staff_management() if Service.is_element_present(cls.driver, By.LINK_TEXT, '员工管理'): actual = 'PM_correct' else: actual = 'PM_failed' cls.driver.refresh() cls.assertEqual(actual, expect)