def test_addaction(self, browser, log_up): try: log_up.info('测试用例:活动中心添加活动') loginsuccess(browser) ac = Action_page(browser) ac.addaction() except Exception as e: print("Exception happening :" + str(e)) raise
def test_addgoods(self, browser, log_up): try: log_up.info('测试用例:物品添加') loginsuccess(browser) gp = Goods_page(browser) gp.addgoods() except Exception as e: print("Exception happening :" + str(e)) raise
def test_import(self, browser, log_up): try: log_up.info('测试用例:签约合同') loginsuccess(browser) bi = batch_import_page(browser) bi.click_import() except Exception as e: print("Exception happening :" + str(e)) raise
def test_click_add(self, browser, log_up): try: log_up.info('测试用例:添加部门') loginsuccess(browser) staff = staffmanage_page(browser) staff.add_department() staff.change_iframe() staff.add_action() staff.alert_accept() except Exception as e: print("Exception happening :" + str(e)) raise
def test_add_success(self, browser, log_up): #登录后点击添加学员按钮 try: log_up.info('测试用例:添加学员') loginsuccess(browser) main = mainpage(browser) # 实例化登录后的页面对象(mainpage) main.addstudent() main.clicksave() sleep(0.5) main.switch_alert() name = main.locate().text assert name == '分分' except Exception as e: print("Exception happening :" + str(e)) raise
def test_click_delete02(self, browser, log_up): try: log_up.info('测试用例:请假登记') loginsuccess(browser) staff = staffinfo_page(browser) staff.department() staff.add_department() staff.change_iframe() staff.change_table() staff.delete_locate() staff.alert_acc() except Exception as e: print("Exception happening :" + str(e)) raise
def test_contract(self, browser, log_up): #登录后点击添加学员按钮 try: log_up.info('测试用例:签约合同') loginsuccess(browser) cont = Contract_page(browser) # 实例化登录后的页面对象(mainpage) cont.click_contract() cont.switch_default_content() cont.sign_contract() cont.switch_default_content() sleep(1) cont.last_alert() sleep(0.5) cont.auditing_contract() except Exception as e: print("Exception happening :" + str(e)) raise
def test_click_delete01(self, browser, log_up): try: log_up.info('测试用例:添加员工') loginsuccess(browser) staff = staffinfo_page(browser) staff.department() staff.add_staff() staff.add() staff.accept() staff.content() staff.department() staff.add_department() staff.change_iframe() staff.change_table() staff.add_data() except Exception as e: print(u'Exception is happening:' % e)
def test_add_course(self, browser, log_up): #登录后点击添加学员按钮 try: log_up.info('测试用例:添加课程') loginsuccess(browser) teacher = Teach_page(browser) # 实例化登录后的页面对象(mainpage) teacher.addcourse() teacher.switch_default_content() teacher.switch_frame() teacher.select_student() teacher.switch_default_content() teacher.close1() teacher.frame() teacher.click_save() sleep(0.5) teacher.accept_alert() teacher.loca_course() teacher.accept_alert() sleep(0.5) teacher.accept_alert() except Exception as e: print("Exception happening :" + str(e)) raise