当我尝试运行功能测试时,我得到:
selenium http.client.BadStatusLine: ''
(完整错误如下)。测试开始运行,第一个返回错误,而不是挂断,我必须手动中断。 (第一个错误是预期的错误,所以不要担心。)
这昨晚完美无缺;我不知道发生了什么。
我尝试升级Selenium(说我已经有了最新版本),我升级了Firefox。没有什么区别。
有什么想法吗?
Creating test database for alias 'default'...
E^CE
======================================================================
ERROR: test_menu_displays (functional_tests.tests.EditorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/larapsodia/dict/dev/functional_tests/tests.py", line 52, in test_menu_displays
quickadd_button_text = self.browser.find_element_by_id('id_quickadd').text
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 269, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 752, in find_element
'value': value})['value']
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: {"method":"id","selector":"id_quickadd"}
Stacktrace:
at FirefoxDriver.findElementInternal_ (file:///tmp/tmplqx8mg0p/extensions/fxdriver@googlecode.com/components/driver-component.js:10770)
at fxdriver.Timer.setTimeout/<.notify (file:///tmp/tmplqx8mg0p/extensions/fxdriver@googlecode.com/components/driver-component.js:625)
======================================================================
ERROR: test_page_displays (functional_tests.tests.EditorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/larapsodia/dict/dev/functional_tests/tests.py", line 32, in test_page_displays
self.browser.get(EDITOR_DEV_SITE_URL)
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 248, in get
self.execute(Command.GET, {'url': url})
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 234, in execute
response = self.command_executor.execute(driver_command, params)
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/remote_connection.py", line 401, in exe
cute
return self._request(command_info[0], url, body=data)
File "/home/larapsodia/.virtualenvs/django18/lib/python3.4/site-packages/selenium/webdriver/remote/remote_connection.py", line 433, in _re
quest
resp = self._conn.getresponse()
File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse
response.begin()
File "/usr/lib/python3.4/http/client.py", line 351, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.4/http/client.py", line 321, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
答案 0 :(得分:0)
我仍然不知道发生了什么事,但今天早上又恢复了工作。我没有更改任何代码或任何内容。
奇怪的硒。