Selenium IE Webdriver在启动时出现连接问题

时间:2013-12-09 21:11:19

标签: python internet-explorer selenium webdriver browser-automation

我需要使用selenium webdriver来测试IE。我遵循了官方谷歌代码项目文档中完全相同的说明。并且我能够使用代码启动IE webdriver但是会出现以下错误

File "c:\python27\scripts\behave-script.py", line 9, in <module>
  load_entry_point('behave==1.2.3', 'console_scripts', 'behave')()
File "c:\Python27\lib\site-packages\behave\__main__.py", line 111, in main
  failed = runner.run()
File "c:\Python27\lib\site-packages\behave\runner.py", line 474, in run
  return self.run_with_paths()
File "c:\Python27\lib\site-packages\behave\runner.py", line 504, in run_with_paths
  failed = feature.run(self)
File "c:\Python27\lib\site-packages\behave\model.py", line 410, in run
  failed = scenario.run(runner)
File "c:\Python27\lib\site-packages\behave\model.py", line 676, in run
  runner.run_hook('before_scenario', runner.context, self)
File "c:\Python27\lib\site-packages\behave\runner.py", line 465, in run_hook
  self.hooks[name](context, *args)
File "c:\work\niqs\environment.py", line 24, in before_scenario
  context.driver = getattr(webdriver, WEB_DRIVER)()
File "c:\Python27\lib\site-packages\selenium\webdriver\ie\webdriver.py", line 54, in __init__
  desired_capabilities=capabilities)
File "c:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 71, in __init__
  self.start_session(desired_capabilities, browser_profile)
File "c:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 113, in start_session
  'desiredCapabilities': desired_capabilities,
File "c:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 162, in execute
  response = self.command_executor.execute(driver_command, params)
File "c:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 350, in execute
  return self._request(url, method=command_info[0], data=data)
File "c:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 391, in _request
  return self._request(resp.getheader('location'), method='GET')
File "c:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 382, in _request
  resp = self._conn.getresponse()
File "c:\Python27\lib\httplib.py", line 1045, in getresponse
  response.begin()
File "c:\Python27\lib\httplib.py", line 409, in begin
  version, status, reason = self._read_status()
File "c:\Python27\lib\httplib.py", line 365, in _read_status
  line = self.fp.readline(_MAXLINE + 1)
File "c:\Python27\lib\socket.py", line 476, in readline
  data = self._sock.recv(self._rbufsize)
socket.error: [Errno 10053] An established connection was aborted by the software in your host machine
  1. 我没有连接的代理或防火墙问题
  2. 可以使用Firefox执行相同的代码
  3. 我的测试环境是win7(64位)IE 9/10/11和IEDriverServer_x64_2.38.0.zip
  4. 之前有没有人有类似的情况?谢谢

0 个答案:

没有答案