【问题标题】:Selenium 3.3.0 with GeckoDriver 0.11.0 crashes in location propertySelenium 3.3.0 与 GeckoDriver 0.11.0 在 location 属性中崩溃
【发布时间】:2017-03-08 20:52:26
【问题描述】:

在 Selenium 3.3.0 发布后,我们的一些测试今天开始失败,并出现以下错误:

@property
def location(self):
    """The location of the element in the renderable canvas."""
    if self._w3c:
        old_loc = self._execute(Command.GET_ELEMENT_RECT)['value']
    else:
        old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
  new_loc = {"x": round(old_loc['x']),
               "y": round(old_loc['y'])}

E TypeError: 'NoneType' 对象不可下标

.tox/py34/lib/python3.4/site-packages/selenium/webdriver/remote/webelement.py:403: TypeError

软件包/软件版本:

  • 硒 3.3.0
  • pytest-selenium 1.9.1
  • geckodriver 0.11.0

问题:

  1. 除将 selenium 降级为 3.0.2?
  2. 看起来像一个错误,但我不确定在哪里提交,GeckoDriver 问题跟踪器?

PS:我知道这是一个非常旧的 GeckoDriver 版本,很遗憾,不能更新。

【问题讨论】:

    标签: python selenium geckodriver


    【解决方案1】:

    由于命令响应值的变化,Selenium 3.3.0 需要 geckodriver 0.15

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-04
      • 2017-07-29
      • 2017-06-18
      • 2018-05-17
      • 2021-12-01
      相关资源
      最近更新 更多