Selenium tests pass if run with command `tox -evenv -- /bin/bash run_tests.sh -N --only-selenium` or `tools/with_venv.sh ./run_tests.sh --only-selenium`, but fail if run with `tox -evenv -- /bin/bash run_tests.sh -N --with-selenium` with the following errors:
======================================================================
ERROR: test_inline_editing_cancel (openstack_dashboard.dashboards.identity.projects.tests.SeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/timur/develop/horizon/openstack_dashboard/test/helpers.py", line 80, in instance_stub_out
return fn(self, *args, **kwargs)
File "/home/timur/develop/horizon/openstack_dashboard/dashboards/identity/projects/tests.py", line 1748, in test_inline_editing_cancel
"//td[@data-update-url='/identity/?action=cell_update"
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 230, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 662, in find_element
{'using': by, 'value': value})['value']
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 173, in execute
self.error_handler.check_response(response)
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 166, in check_response
raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'Unable to locate element: {"method":"xpath","selector":"//td[@data-update-url=\'/identity/?action=cell_update&table=tenants&cell_name=name&obj_id=1\']"}' ; Stacktrace:
at FirefoxDriver.prototype.findElementInternal_ (file:///<email address hidden>/components/driver-component.js:9618:26)
at fxdriver.Timer.prototype.setTimeout/<.notify (file:///<email address hidden>/components/driver-component.js:548:5)
======================================================================
ERROR: test_inline_editing_cancel (openstack_dashboard.dashboards.identity.projects.tests.SeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/timur/develop/horizon/openstack_dashboard/test/helpers.py", line 404, in tearDown
self.mox.VerifyAll()
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/mox.py", line 286, in VerifyAll
mock_obj._Verify()
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/mox.py", line 506, in _Verify
raise ExpectedMethodCallsError(self._expected_calls_queue)
ExpectedMethodCallsError: Verify: Expected methods never called:
0. tenant_get.__call__(<IgnoreArg>, u'1', admin=True) -> <Tenant {'description': 'a test tenant.', 'enabled': True, 'domain_name': 'test_domain', 'id': '1', 'domain_id': '1', 'name': 'test_tenant'}>
======================================================================
ERROR: test_inline_editing_update (openstack_dashboard.dashboards.identity.projects.tests.SeleniumTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/timur/develop/horizon/openstack_dashboard/test/helpers.py", line 80, in instance_stub_out
return fn(self, *args, **kwargs)
File "/home/timur/develop/horizon/openstack_dashboard/dashboards/identity/projects/tests.py", line 1684, in test_inline_editing_update
"//td[@data-update-url='/identity/?action=cell_update"
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 230, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 662, in find_element
{'using': by, 'value': value})['value']
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 173, in execute
self.error_handler.check_response(response)
File "/home/timur/develop/horizon/.venv/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 166, in check_response
raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'Unable to locate element: {"method":"xpath","selector":"//td[@data-update-url=\'/identity/?action=cell_update&table=tenants&cell_name=name&obj_id=1\']"}' ; Stacktrace:
at FirefoxDriver.prototype.findElementInternal_ (file:///<email address hidden>/components/driver-component.js:9618:26)
at fxdriver.Timer.prototype.setTimeout/<.notify (file:///<email address hidden>/components/driver-component.js:548:5)
Seen on both master and stable/icehouse (I assume stable/juno is affected too). When it doesn't work one sees only "500 error" displayed in the browser window that pops up, which is why the tests are failing since no element can be found. It occurs whether the tests are ran headlessly or not.
However it doesn't happen either when running a subset of tests, e.g. openstack_ dashboard. dashboards. identity. projects. tests. Something appears to be leaking somewhere...