selenium 鼠标事件

 

1.鼠标不仅仅可以点击(click),鼠标还有其它的操作,如:鼠标悬停在某个元素上,鼠标右击,鼠标按住某个按钮拖到
2.鼠标事件需要先导入模块:from selenium.webdriver.common.action_chainsimport ActionChains
perform() 执行所有 ActionChains 中的行为
move_to_element() 鼠标悬停
3.这里以百度页面设置按钮为例
4.除了常用的鼠标悬停事件外,还有
右击鼠标:context_click()
双击鼠标:double_click()



猜你喜欢

转载自blog.csdn.net/qq_41370110/article/details/80913424