📅  最后修改于: 2022-03-11 15:00:12.831000             🧑  作者: Mango
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()