def __init__(self, driver): self.driver = driver Service.miss_login(driver, '../config/base.conf')
def setUp(self): print('test start') self.driver = Service.get_driver('../config/base.conf') Service.miss_login(self.driver, '../config/base.conf') self.driver.find_element_by_link_text(u'资源管理').click() self.train = ResourceTrain(self.driver)
def do_modify_student_info(self,name,stu_tel,status,fee,person,connect_tel,school,diploma,major,id_number,age): self.click_student_manage_link() self.click_student_info_link() self.click_query_btn() self.click_modify_btn() self.input_box_stu_name(name) self.input_box_stu_tel(stu_tel) self.select_new_status(status) self.select_pay_fee(fee) self.input_connect_person(person) self.input_connect_tel(connect_tel) self.input_box_school(school) self.select_diploma(diploma) self.input_major(major) self.input_id_number(id_number) # self.click_graduate_time() self.input_stu_age(age) self.click_save_btn() if __name__ == '__main__': from selenium import webdriver driver = webdriver.Firefox() driver.get('http://192.168.159.141:8080/WoniuBoss4.0') driver.maximize_window() driver.implicitly_wait(2) Service.miss_login(driver, '../config/base.conf') StudentInfo(driver).do_search_info('测试','全部','全部','吕布')