安心一 2024-10-27 11:00 采纳率: 0%
浏览 5

selenium如何定位元素

img


如何定位到这一段元素,并且模拟鼠标悬停操作呢?主要是没定位到元素。
ac = ActionChains(oem)
ac.move_to_element(oem.find_element(By.CSS_SELECTOR, '.dec-slider > bi-abs > bi-basic-button')).perform()
这一段是我自己写的代码,一直没找到元素,卡半天了

img

  • 写回答

1条回答 默认 最新

  • 二九筒 2024-10-27 11:59
    关注

    试试xpath定位

    评论

报告相同问题?

问题事件

  • 修改了问题 10月27日
  • 创建了问题 10月27日