📜  右键单击 selenium - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:28.143000             🧑  作者: Mango

代码示例3
from selenium import webdriver

from selenium.webdriver import ActionChains

import time

driver = webdriver.Chrome()

driver.get("https://swisnl.github.io/jQuery-contextMenu/demo.html")
button=driver.find_element_by_xpath("//body[@class='wy-body-for-nav']")

action=ActionChains(driver)
action.context_click(button).perform()