selenium+python3 鼠标事件

1、鼠标右击

ActionChains(driver).contest_click(right_click).perform()

2、鼠标悬停

ActionChains(driver).move_to_element(above).perform()

3、鼠标双击

ActionChains(driver).double_click(double_click).perform()

4、鼠标拖放操作

drag_and_drop(source,target)

source:鼠标拖动的源元素

target:鼠标释放的目标元素

 
原文地址:https://www.cnblogs.com/cymwill/p/6491339.html