鼠标右键
2019-11-15 本文已影响0人
星辰_1c3b
from selenium.webdriver import ActionChains # 鼠标右键操作模拟
order=d.find_element_by_xpath('//*[@class=" cellselected"]') #找到需要右键的元素
rig=ActionChains(d) #实例化ActionChains类
rig.context_click(order).perform() # context_click(logo)在logo上执行右键操作,perform()是一个执行动作

参考:https://blog.csdn.net/jusulysunbeamy/article/details/90003194