Python Selenium 3.3.0和GeckoDriver 0.11.0在location property中崩溃
在Selenium 3.3.0发布后,我们的一系列测试今天开始失败,出现以下错误:Python Selenium 3.3.0和GeckoDriver 0.11.0在location property中崩溃,python,selenium,geckodriver,Python,Selenium,Geckodriver,在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 = s
@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']
E类型错误:“非类型”对象不可下标
.tox/py34/lib/python3.4/site packages/selenium/webdriver/remote/webelement.py:403:TypeError
软件包/软件的版本:
- 硒3.3.0
- pytest selenium 1.9.1
- 壁虎河0.11.0
PS:我知道这是GeckoDriver的一个非常旧的版本,很遗憾,更新不是一个选项。Selenium 3.3.0需要GeckoDriver 0.15,因为命令响应值发生了变化
new_loc = {"x": round(old_loc['x']),
"y": round(old_loc['y'])}