from selenium import webdriver
wd = webdriver.Chrome()
// 设置超时时间
wd.implicitly_wait(10)
// 设置打来网址
wd.get('http://www.51job.com')
// 选择器定位元素
element = wd.find_element_by_id('work_position_input')
element.click()
elements = wd.find_elements_by_css_selector('#work_position_click_center_right em.on')
for element in elements:
element.click()
wd.find_element_by_id('work_position_click_center_right_list_category_000000_010000').click()
wd.find_element_by_id('work_position_click_bottom_save').click()
wd.find_element_by_id('kwdselectid').send_keys('自动化测试工程\n')
// 接收标签中的内容
elements = wd.find_elements_by_css_selector('div.dw_table > div.el')
for element in elements:
print(element.text)
// 退出
wd.quit()