📜  如何使用 selenium 右键单击 - 无论代码示例

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

代码示例2
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()