from selenium.webdriver import ActionChainselement = driver.find_element(By.ID, 'login')action_chains = ActionChains(driver) # 实例化ActionChains对象
# move_to_element() 移动到需要被定位元素位置
# double_click() 双击
# context_click() 右击
# perform() 存储在ActionChains()对象的行为,然后提交
action_chains.move_to_element(element).double_click().perform()
action_chains.move_to_element(element).context_click().perform()