# 导入selenium中的actionchains的方法

from selenium.webdriver.common.action_chains import ActionChains

#识别需要悬停的元素

ele = self.driver.find_element_by_class_name('member-top')

# 鼠标移到悬停元素上

ActionChains(self.driver).move_to_element(ele).perform()

相关文章: