【问题标题】:How do you fix the “element not interactable” exception in selenium? [duplicate]您如何修复 selenium 中的“元素不可交互”异常? [复制]
【发布时间】:2020-05-23 10:57:36
【问题描述】:

免责声明:我发现了与此相关的其他问题,但没有解决方案。 在 python 上单击带有 selenium 的按钮时,出现此错误:

selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
  (Session info: chrome=83.0.4103.61)

在那之前,没有任何问题。这个按钮很大,就在页面的中间,我用一个唯一的 id 访问它。当我自己移动鼠标并单击它时,它会按预期工作。

知道为什么会发生这种情况吗?

【问题讨论】:

  • 您介意分享您的代码吗?

标签: python-3.x selenium selenium-webdriver webdriver selenium-chromedriver


【解决方案1】:

发生这种情况的原因有很多,请尝试以下方法: 1-确保元素在视口中可见。 2- 确保没有 z-index 高于目标元素的元素。 3- 确保上面没有显示 Tippy 菜单或弹出菜单。 4- 确保没有隐藏/玻璃元素覆盖它,但您无法亲眼看到它。

如果可行,请告诉我

【讨论】:

    猜你喜欢
    • 2020-12-08
    • 1970-01-01
    • 1970-01-01
    • 2017-10-22
    • 1970-01-01
    • 2020-02-11
    • 2017-12-24
    • 2020-08-26
    • 2020-09-28
    相关资源
    最近更新 更多