对鼠标的点击事件做了一些了解,从百度发现有很多相关内容
参考文章https://www.ibm.com/developerworks/cn/java/j-lo-keyboard/ 和 http://blog.csdn.net/liujingqiu/article/details/50475833
首先引入模块 from selenium.webdriver.common.action_chains import ActionChains
#鼠标双击事件 double = driverChrome.find_element_by_xpath('//*[@id="dynamicLayout_0"]/div/div/dl/dt/a') ActionChains(driverChrome).double_click(double).perform()
# 拖动 source = driverChrome.find_element_by_xpath('path1') target = driverChrome.find_element_by_xpath('path2') ActionChains(driverChrome).drag_and_drop(source, target).perform()
#鼠标移到元素上 above = driverChrome.find_element_by_xpath('//*[@id="dynamicLayout_0"]/div/div/dl/dd[2]/span/i') ActionChains(dri