# for item in range(4): #查询评委工号 driver.find_element_by_xpath("//td[@id='mailTo-inputCell']/following-sibling::td").click() #调用员工查询界面 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__': login=nhrLogin() login.login() login.menu(2) driver=login.driver queryclass(driver,3,1) selectcla(driver,7) # notice(driver) task(driver)
os.system(BIN_HOME) #os.system("D:\\119937\\workspace\\autotest\\src\\com\\deppon\\nhr\\bin\\uploadfile.exe") #浏览文件路径,input控件 # inputfile=driver.find_element_by_xpath("//input[@name='']") # inputfile.send_keys(u"d:\\119937\\Desktop\\data\\stuAuthImport.xlsx") #点击导入按钮 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() #返回班级列表 re=driver.find_element_by_xpath(u"//div[em[button[span[text()='邮件提醒']]]]/following-sibling::div//button[span[text()='返回']]") re.click() def impStu(driver): pass if __name__=='__main__': st=nhrLogin() st.login() st.menu() driver=st.driver queryclass(driver) sleep(3) selectcla(driver, ls=6) notice(driver)
''' from com.deppon.nhr.login.login import nhrLogin from com.deppon.nhr.login.authclass import newclass from com.deppon.nhr.student.impstudent import notice,selectcla from com.deppon.nhr.publib.query import queryclass,queryjudges from time import sleep from com.deppon.nhr.globalvar import globalvar from com.deppon.nhr.judges.task import task auth=nhrLogin() auth.login() auth.menu() driver=auth.driver try: count=0 for li in range(1,3): for le in range(1,5): newclass(driver,li,le) gl=globalvar() name=gl.get_name() queryclass(driver,li,le,name) selectcla(driver) notice(driver) # selectcla(driver) # task(driver) count+=1 sleep(2) print("总计新增班级成功:%s"%count) finally: auth.logout()