def add_stage_grade(self, info):
     self.into_stu_manage()
     Service.into_module(self.driver, '阶段考评')
     xpath = "//span[@class='pagination-info']"
     num = Service.random_delete(self.driver, xpath)
     # 点击随机到的录入按钮
     time.sleep(1)
     self.driver.find_element_by_xpath(
         f"//tr[{num}]/td[9]/button[@class='btn btn-padding btn-info']"
     ).click()
     #输入班级
     classes = self.driver.find_element_by_xpath('//*[@id="ph_cl"]')
     Service.droplist(classes, info['classes'])
     # 输入阶段
     stage = self.driver.find_element_by_xpath("//select[@id='ph_phase']")
     Service.droplist(stage, info['stage'])
     # 输入分数
     grade = self.driver.find_element_by_xpath("//div[3]/div[1]/input")
     Service.send_input(grade, info['grade'])
     #输入评语
     evaluate = self.driver.find_element_by_xpath(
         "//div[3]/div[3]/textarea")
     Service.send_input(evaluate, info['evaluate'])
     # 点击保存
     self.driver.find_element_by_xpath(
         "//div[9]/div/div/div[3]/button").click()
Esempio n. 2
0
 def upload_resource(self, info):
     self.into_resource()
     self.driver.find_element_by_xpath(
         "/html/body/div[8]/div[2]/div[2]/button[3]").click()  #点击上传按钮
     area = self.driver.find_element_by_xpath(
         "//select[@id='regionSelect']")  #区域下拉框
     Service.droplist(area, info['area'])
     partment = self.driver.find_element_by_xpath(
         "//select[@id='dpetSelect']")  #部门下拉框
     Service.droplist(partment, info['partment'])
     self.driver.find_element_by_xpath('//*[@id="files"]').send_keys(
         info['path'])  #传入文件路径
     self.driver.find_element_by_xpath(
         "//div[@class='modal-footer']/button[@class='btn btn-primary btn-padding']"
     ).click()
     msg = self.driver.find_element_by_xpath(
         "//div[@class='bootbox-body']").get_attribute("innerHTML")
     return msg
 def search_week_grade(self, info):
     self.into_stu_manage()
     Service.into_module(self.driver, '周考成绩')
     #选择区域
     area = self.driver.find_element_by_xpath(
         "//select[@class='sel-text'][1]")
     Service.droplist(area, info['area'])
     #选择班级
     classes = self.driver.find_element_by_xpath(
         "//select[@class='sel-text'][2]")
     Service.droplist(classes, info['classes'])
     #输入姓名
     name = self.driver.find_element_by_xpath(
         "//div[2]/div/div/div/div[1]/input")
     Service.send_input(name, info['name'])
     #点击查询
     self.driver.find_element_by_xpath(
         "//div[2]/div/div/div/div[1]/button").click()
 def alter_stu_info(self, info):
     self.into_stu_manage()
     Service.into_module(self.driver, '学员信息')
     #先点击查询
     self.driver.find_element_by_xpath(
         "//button[@class='btn btn-info btn-padding']").click()
     time.sleep(1)
     xpath = "//span[@class='pagination-info']"
     num = Service.random_delete(self.driver, xpath)
     #点击随机到的资源修改按钮
     self.driver.find_element_by_xpath(
         f"//tr[{num}]/td[12]/button[@class='btn btn-info'][2]").click()
     time.sleep(1)
     #修改电话
     phone = self.driver.find_element_by_name("stu.tel")
     Service.send_input(phone, info['phone'])
     #修改状态
     status = self.driver.find_element_by_name("stu.status")
     Service.droplist(status, info['status'])
     self.driver.find_element_by_xpath(
         "//div[@class='modal-content']/div[@class='modal-footer']/button[@class='btn btn-primary btn-save']"
     ).click()
 def add_week_grade(self, info):
     self.into_stu_manage()
     Service.into_module(self.driver, '周考成绩')
     xpath = "//span[@class='pagination-info']"
     num = Service.random_delete(self.driver, xpath)
     #点击随机到的录入按钮
     time.sleep(1)
     self.driver.find_element_by_xpath(
         f"//tr[{num}]/td[9]/button[@class='btn btn-padding btn-info']"
     ).click()
     #输入阶段
     stage = self.driver.find_element_by_xpath("//select[@id='we_phase']")
     Service.droplist(stage, info['stage'])
     #输入周数
     # weekinfo=self.driver.find_element_by_xpath("//select[@id='we_week']")
     # Service.droplist(stage, info['weekinfo'])
     #输入分数
     grade = self.driver.find_element_by_xpath(
         "//div[@class='col-md-12 col-sm-12 col-xs-12 form-group'][4]/input[@class='text']"
     )
     Service.send_input(grade, info['grade'])
     #点击保存
     self.driver.find_element_by_xpath(
         "//div[9]/div/div/div[3]/button").click()
Esempio n. 6
0
 def select_lect(self, value):
     lect = self.driver.find_element_by_xpath('//*[@id="addCourse-table"]/tr/td[1]/select')
     Service.droplist(lect, value)
Esempio n. 7
0
 def select_gra(self, value):
     gra = self.driver.find_element_by_id('semesterSelect')
     Service.droplist(gra, value)
Esempio n. 8
0
 def input_workage(self, workage):
     ele = self.driver.find_element_by_xpath(
         '/html/body/div[11]/div/div/form/div/div/div[12]/select')
     Service.droplist(ele, workage)
Esempio n. 9
0
 def input_education(self, education):
     ele = self.driver.find_element_by_xpath(
         '/html/body/div[11]/div/div/form/div/div/div[10]/select')
     Service.droplist(ele, education)
Esempio n. 10
0
 def input_status(self, status):
     ele = self.driver.find_element_by_xpath(
         '/html/body/div[11]/div/div/form/div/div/div[6]/select')
     Service.droplist(ele, status)
Esempio n. 11
0
 def input_partment(self, partment):
     ele = self.driver.find_element_by_xpath(
         '/html/body/div[11]/div/div/form/div/div/div[2]/select')
     Service.droplist(ele, partment)
Esempio n. 12
0
 def input_area(self, area):
     ele = self.driver.find_element_by_xpath(
         '/html/body/div[11]/div/div/form/div/div/div[1]/select')
     Service.droplist(ele, area)
Esempio n. 13
0
 def select_result(self, value):
     res = self.driver.find_element_by_xpath('//*[@id="isPassSkill"]')
     Service.droplist(res, value)
Esempio n. 14
0
 def select_inter(self, value):
     inter = self.driver.find_element_by_id('studentSelect')
     Service.droplist(inter, value)
Esempio n. 15
0
 def select_altertear(self,value):
     altert = self.driver.find_element_by_xpath('/html/body/div[15]/div/div/form/div/div/div[3]/select')
     Service.droplist(altert,value)
Esempio n. 16
0
 def select_direc(self,value):
     direc = self.driver.find_element_by_xpath('/html/body/div[8]/div[2]/div/div[1]/select[3]')
     Service.droplist(direc,value)
Esempio n. 17
0
 def select_teacher(self,value):
     teac = self.driver.find_element_by_xpath('/html/body/div[8]/div[2]/div/div[1]/select[2]')
     Service.droplist(teac,value)
Esempio n. 18
0
 def select_campus(self,value):
     camp = self.driver.find_element_by_xpath('/html/body/div[8]/div[2]/div/div[1]/select[1]')
     Service.droplist(camp,value)
Esempio n. 19
0
 def select_course(self,value):
     course = self.driver.find_element_by_xpath('/html/body/div[15]/div/div/div[2]/form/div[2]/table/tbody/tr/td[4]/select')
     Service.droplist(course,value)
Esempio n. 20
0
 def select_classr(self,value):
     classr = self.driver.find_element_by_xpath('//*[@id="addCourse-table"]/tr/td[2]/select')
     Service.droplist(classr,value)
Esempio n. 21
0
 def input_source(self, source):
     ele = self.driver.find_element_by_xpath(
         '/html/body/div[11]/div/div/form/div/div/div[14]/select')
     Service.droplist(ele, source)
Esempio n. 22
0
 def select_area(self, value):
     area = self.driver.find_element_by_id('region_id')
     Service.droplist(area, value)