# coding:utf-8
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains

driver = webdriver.Firefox()
driver.get("http://xxxxxxx.com")
# 定位鼠标悬停才显示的“退出登录”按钮
mouse = self.driver.find_element_by_xpath("//*[contains(text(),'hello')]")
ActionChains(self.driver).move_to_element(mouse).perform()
self.driver.find_element_by_xpath("//*[contains(text(),'退出登录')]").click()

 

相关文章:

  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
相关资源
相似解决方案