from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
driver = webdriver.Chrome()
driver.get('http://www.baidu.com')
driver.implicitly_wait(10)
''' 鼠标悬停
mouse = driver.find_element_by_link_text('设置')
ActionChains(driver).move_to_element(mouse).perform()
driver.find_element_by_link_text('高级搜索').click()
'''
''' 鼠标拖拽
mouse1 = driver.find_element_by_link_text('xxxxx')
mouse2 = driver.find_element_by_link_text('xxxxxx')
ActionChains(driver).drag_and_drop(mouse1, mouse2).perform()
'''
'''鼠标右击
mouse1 = driver.find_element_by_link_text('xxxxx')
ActionChains(driver).context_click(mouse1).perform()
'''
'''鼠标双击
mouse1 = driver.find_element_by_link_text('xxxx')
ActionChains(driver).double_click(mouse1).perform()
'''