def input_comment(self, comment): ele = self.driver.find_element_by_css_selector( '#phaseExam-form > div:nth-child(3) > ' 'div:nth-child(3) > textarea') Service.send_input(ele, comment)
def input_score(self, score): ele = self.driver.find_element_by_css_selector( '#phaseExam-form > div:nth-child(3) > div:nth-child(1) > input:nth-child(2)' ) Service.send_input(ele, score)
def select_phase(self, phase): Service.box_id_click(self.driver, 'ph_phase', phase)
def click_phase_exam_link(self): Service.wait_until_element_is_visible(self.driver, By.LINK_TEXT, '阶段考评') self.driver.find_element_by_link_text('阶段考评').click()
def select_class(self, class_name): Service.box_id_click(self.driver, 'ph_cl', class_name)
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.public = ResourcePublic(self.driver)
def setUpClass(cls): cls.driver = Service.get_driver('../config/base.conf') cls.phase_exam = PhaseExam(cls.driver)
def input_username(self, username): u_name = self.driver.find_element_by_name('userName') Service.send_input(u_name, username)
def input_checkcode(self, checkcode): u_code = self.driver.find_element_by_name("checkcode") Service.send_input(u_code, checkcode)
def input_password(self, password): u_pass = self.driver.find_element_by_name('userPass') Service.send_input(u_pass, password)