鼠标悬停

>>> from selenium.webdriver.common.action_chains import ActionChains
>>> setting = driver.find_element_by_xpath("//div[@id='u1']/a[7]")
>>> ActionChains(driver).move_to_element(setting).perform()
>>> driver.find_element_by_class_name("setpref")
<selenium.webdriver.remote.webelement.WebElement object at 0x7fd7070589d0>
>>> driver.find_element_by_class_name("setpref").click()

 

鼠标悬停

ActionChains(driver).move_to_element(element).perform()
posted @ 2015-07-08 22:48  isister  阅读(186)  评论(0编辑  收藏  举报