#coding=utf-8

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
import time
import os

driver = webdriver.Firefox()
#获取aaa.html的绝对路径
file_path = os.path.abspath('aaa.html')
print file_path
driver.get(file_path)
#点击Link1链接(弹出下拉列表)
driver.find_element_by_xpath("html/body/div[1]/div/div/a").click()
#在下拉列表中找到如下xpath路径对应元素
menu = driver.find_element_by_xpath("//*[@id='dropdown1']/li[1]/a")
time.sleep(3)
#鼠标定位到该元素上
webdriver.ActionChains(driver).move_to_element(menu).perform()
time.sleep(3)
driver.quit()