使用鼠标模拟操作需要倒入from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.action_chains import ActionChains
ele = driver.find_element(By.ID,"s-usersetting-top") ActionChains(driver).move_to_element(ele).perform()