Example #1
0
# -*-coding:utf-8-*-
from com.deppon.nhr.login.login import driver, sleep, loginNhr, menu

loginNhr()
menu()
mainNav3 = driver.find_element_by_xpath(u"//div[text()='认证资料库']").click()
print("进入资料库")
sleep(3)
print("选择认证大类")
idenCa = driver.find_element_by_xpath(u"//td[input[@name='identificationkind']]/following-sibling::td/div[1]")
idenCa.click()
caSe = driver.find_element_by_xpath(u"//li[text()='IT类']")
caSe.click()
sleep(1)
print("选择认证层级")
idenLe = driver.find_element_by_xpath(u"//td[input[@name='identificationlevel']]/following-sibling::td/div[1]")
idenLe.click()
leSe = driver.find_element_by_xpath(u"//li[text()='中级']")
leSe.click()
sleep(1)
print("选择条目性质")
idenLe = driver.find_element_by_xpath(u"//td[input[@name='itemproperty']]/following-sibling::td/div[1]")
idenLe.click()
leSe = driver.find_element_by_xpath(u"//li[text()='认证面谈']")
leSe.click()

print("点击新增按钮")
btn = driver.find_element_by_xpath(u"//button[span[text()='新增']]")
btn.click()
print("新增条目")
itemname = driver.find_element_by_xpath(u"//input[@name='itemname']")
Example #2
0
#-*-coding:utf-8-*-
from com.deppon.nhr.login.login import loginNhr
from com.deppon.nhr.login.login import menu
from com.deppon.nhr.login.login import driver,sleep
from selenium.webdriver.common.action_chains import ActionChains

loginNhr()
menu()
#认证开班管理
menuMan=driver.find_element_by_xpath(u"//div[text()='认证开班管理']")
menuMan.click()
sleep(2)
#新增开班

nBtnClass=driver.find_element_by_xpath(u"//div[@id='T_authinfo-authClassMng']//button[span[text()='新开班']]")
nBtnClass.click()

#输入开班名称

classNa=driver.find_element_by_xpath(u"//body/div[contains(@id,'ext-comp')]//input[@name='classname']")
classNa.send_keys(u"2015年一百届高级认证开班")

#输入地点

classAddr=driver.find_element_by_xpath(u"//body/div[contains(@id,'ext-comp')]//input[@name='address']")
classAddr.send_keys(u"德邦学院D122")
print("选择认证大类")
#点击认证大类下拉选择框

ciIdenti=driver.find_element_by_xpath(u"//body/div[contains(@id,'ext-comp')]//input[@name='identificationkind']")
ciIdenti.click()