1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Fixed occasional selenium test failure on Jenkins with Chrome 36+.

Previously find_element_by_id('id_password') on the next line failed with
NoSuchElementException and selenium.page_source was
<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body></body></html>.

Possibly related: https://code.google.com/p/selenium/issues/detail?id=1969.
This commit is contained in:
Tim Graham 2014-08-13 09:55:24 -04:00
parent 6426928f56
commit 8ed7834fb2

View File

@ -1126,7 +1126,7 @@ class RelatedFieldWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
# Click the Add User button to add new
self.selenium.find_element_by_id('add_id_user').click()
self.selenium.switch_to.window('id_user')
self.wait_page_loaded()
self.wait_for('#id_password')
password_field = self.selenium.find_element_by_id('id_password')
password_field.send_keys('password')