Esempio n. 1
0
    os.system(bin_home)
    # os.system("../temp/uploadfile.exe")
    '''
    # 将导入学员模板excel路径输入到浏览按钮
    log.info("导入学员模板路径:%s" % os.path.abspath(stufile))
    driver.find_element_by_xpath("//input[@name='stuexcel']").send_keys(impfile)

    # 点击导入按钮
    driver.find_element_by_xpath(u"//button[span[text()='导入']]").click()
    sleep(2)

    # 导入成功
    driver.find_element_by_xpath(u"//body/div[contains(@id,'messagebox')]//button[span[text()='确定']]").click()
    log.info("导入学员成功,返回班级列表")
    # 返回班级列表
    re = driver.find_element_by_xpath(u"//div[em[button[span[text()='邮件提醒']]]]/following-sibling::div \
                                       //button[span[text()='返回']]")
    re.click()

if __name__ == '__main__':
    self = startup
    startup(self)
    login(self)
    menu(self)
    newclass(self)
    gl1 = globalvar()
    cla = gl1.get_name()
    queryclass(self, **cla)
    selectcla(self)
    notice(self)
Esempio n. 2
0
    '''
    # 查询评委工号
    driver.find_element_by_xpath("//td[@id='mailTo-inputCell']/following-sibling::td").click()

    # call queryjudges.在查询界面选择评委工号
    queryjudges(driver, '119937', '116460', '000120', '000121')

    # 保存任务
    driver.find_element_by_xpath("//button[@id='savejudgebutton-btnEl']").click()

    #     #邮件发送
    #     inform=driver.find_element_by_xpath("//button[@id='informjudgebutton-btnEl']")
    #     inform.click()

    # 保存任务成功,点击确定
    driver.find_element_by_xpath("//div[contains(@id,'messagebox')]//button[span[text()='确定']]").click()

    # 返回班级列表界面
    driver.find_element_by_xpath("//div[@id='savejudgebutton']/following-sibling::div//button").click()


if __name__ == '__main__':
    self = startup
    self = startup
    startup(self)
    login(self)
    menu(self)
    queryclass(self, li=3, le=1)
    selectcla(self)
    task(self)