有些网页一打开会有一个弹窗,弹窗不消失无法进行取元素操作,只有把鼠标悬停在上面弹窗才会消失,这时就用到了selenium的悬停操作

 

鼠标悬停  move_to_element()

定位到要悬停的元素
move = driver.find_element_by_id("xx")
对定位到的元素执行悬停操作
ActionChains(driver).move_to_element(move).perform()

 

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2022-01-15
  • 2021-09-20
  • 2021-06-07
  • 2021-07-03
猜你喜欢
  • 2022-12-23
  • 2021-09-05
  • 2022-12-23
  • 2021-08-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案