selenium当前元素被遮挡(解决方法)
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys #当前元素被遮挡住(用click点击不成)要用到Keys
browser=webdriver.Chrome()
browser.get('http://trains.ctrip.com/TrainBooking/SearchTrain.aspx###')
#输入起始站
browser.find_element_by_id("notice01").clear()
browser.find_element_by_id("notice01").click()
begin=browser.find_element_by_id("notice01")
begin.send_keys(u"上海")
#输入终点站
browser.find_element_by_id("notice08").clear()
browser.find_element_by_id("notice08").clear()
begin=browser.find_element_by_id("notice08")
begin.send_keys(u"郑州")
#点击搜索按钮
time.sleep(2)
browser.find_element_by_class_name("searchbtn").send_keys(Keys.ENTER)
time.sleep(2)