Description of problem: While running the selenium tests, test_labcontroller in IntegrationTests/src/bkr/inttest/server/selenium/test_distro_trees.py fails randomly with the following errors: ERROR: test_labcontroller (bkr.inttest.server.selenium.test_distro_trees.DistroTreeViewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/devel/beaker/IntegrationTests/src/bkr/inttest/server/selenium/test_distro_trees.py", line 60, in test_labcontroller b.find_element_by_xpath('//div[@class="flash"]').text, File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webdriver.py", line 214, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webdriver.py", line 672, in find_element {'using': by, 'value': value})['value'] File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in execute self.error_handler.check_response(response) File "/usr/lib64/python2.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 149, in check_response raise exception_class(message, screen, stacktrace) NoSuchElementException: Message: u'Unable to locate element: {"method":"xpath","selector":"//div[@class=\\"flash\\"]"}' check the webdriver log, we can see: webdriver [130226 15:46:21.57] [ 97.088s] [webdriver] Received command: clickElement webdriver [130226 15:46:21.57] [ 97.093s] [webdriver] Using native events for click webdriver [130226 15:46:21.58] [ 97.102s] [webdriver] Browser-specific offset (X,Y): 0, 89 webdriver [130226 15:46:22.40] [ 97.922s] [webdriver] Pending native events: false compare to the success case, "Pending native events" should be "true" rather than "false" just after the clickElement command is received. This indicates the click event has been ignored by selenium/firefox, and there is a related issues in selenium group: http://code.google.com/p/selenium/issues/detail?id=2864 we can simply workaround this by disable native events. Version-Release number of selected component (if applicable): selenium-server-standalone-2.21.0.jar firefox-10.0.5-1.el6_2.x86_64 How reproducible: about 10% Steps to Reproduce: 1. ./run-tests.sh -sv bkr.inttest.server.selenium.test_distro_trees 2. repeat step 1 until see the failure Actual results: test_labcontroller failed Expected results: Additional info:
on gerrit: http://gerrit.beaker-project.org/#/c/1752/
Considering the occasional nature of the exception, i ran it a few times and it didn't happen. Also verified with the suggested fix from the Google group conversation and it seems to have done the trick. Setting it to verified.
Beaker 0.12 has been released.