使用python处理selenium中的鼠标悬停问题

# 导入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()

posted @ 2017-12-13 10:16  alsoalso  阅读(10704)  评论(1编辑  收藏  举报