Mouse event:

 

 

Import the webdriver Selenium from 
from selenium.webdriver.common.action_chains Import ActionChains
Import Time
Driver = webdriver.Firefox ()
driver.get ( "https://www.sina.com.cn/")
ELE = driver.find_element_by_link_text ( "Mobile client ")
#ActionChains (Driver) for generating the simulated user behavior, move_to_element () a mouse over the element, perform () performs the storage behavior
ActionChains (Driver) .move_to_element (ELE) .perform ()
the time.sleep (. 1 )
sub_ele = driver.find_element_by_link_text ( "Xinlang")
the time.sleep (. 1)
sub_ele.click ()

Guess you like

Origin www.cnblogs.com/zhang-da/p/12057741.html