>>> from selenium.webdriver.common.action_chains import ActionChains >>> setting = driver.find_element_by_xpath("//div[@id=‘u1‘]/a[7]") >>> ActionChains(driver).move_to_element(setting).perform() >>> driver.find_element_by_class_name("setpref") <selenium.webdriver.remote.webelement.WebElement object at 0x7fd7070589d0> >>> driver.find_element_by_class_name("setpref").click()
ActionChains(driver).move_to_element(element).perform()
时间: 2024-10-16 09:53:58