mirror of
https://github.com/django/django.git
synced 2025-08-18 17:50:58 +00:00
[1.8.x] Fixed #25323 -- Fixed selenium test failures with chromedriver 2.18.
Backport of 7ac0cd445e
from master
This commit is contained in:
parent
3cc67a637a
commit
0d368bfb47
3 changed files with 23 additions and 15 deletions
|
@ -730,13 +730,8 @@ class DateTimePickerSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
|
||||
# Click on the calendar icon
|
||||
self.selenium.find_element_by_id('calendarlink0').click()
|
||||
|
||||
# Get the calendar caption
|
||||
calendar0 = self.selenium.find_element_by_id('calendarin0')
|
||||
caption = calendar0.find_element_by_tag_name('caption')
|
||||
|
||||
# Make sure that the right month and year are displayed
|
||||
self.assertEqual(caption.text, expected_caption)
|
||||
self.wait_for_text('#calendarin0 caption', expected_caption)
|
||||
|
||||
|
||||
class DateTimePickerSeleniumChromeTests(DateTimePickerSeleniumFirefoxTests):
|
||||
|
@ -1097,8 +1092,8 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
|
||||
# Open the popup window and click on a band
|
||||
self.selenium.find_element_by_id('lookup_id_main_band').click()
|
||||
self.wait_for_popup()
|
||||
self.selenium.switch_to.window('id_main_band')
|
||||
self.wait_page_loaded()
|
||||
link = self.selenium.find_element_by_link_text('Bogey Blues')
|
||||
self.assertIn('/band/42/', link.get_attribute('href'))
|
||||
link.click()
|
||||
|
@ -1109,8 +1104,8 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
|
||||
# Reopen the popup window and click on another band
|
||||
self.selenium.find_element_by_id('lookup_id_main_band').click()
|
||||
self.wait_for_popup()
|
||||
self.selenium.switch_to.window('id_main_band')
|
||||
self.wait_page_loaded()
|
||||
link = self.selenium.find_element_by_link_text('Green Potatoes')
|
||||
self.assertIn('/band/98/', link.get_attribute('href'))
|
||||
link.click()
|
||||
|
@ -1132,8 +1127,8 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
|
||||
# Open the popup window and click on a band
|
||||
self.selenium.find_element_by_id('lookup_id_supporting_bands').click()
|
||||
self.wait_for_popup()
|
||||
self.selenium.switch_to.window('id_supporting_bands')
|
||||
self.wait_page_loaded()
|
||||
link = self.selenium.find_element_by_link_text('Bogey Blues')
|
||||
self.assertIn('/band/42/', link.get_attribute('href'))
|
||||
link.click()
|
||||
|
@ -1144,8 +1139,8 @@ class AdminRawIdWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
|
||||
# Reopen the popup window and click on another band
|
||||
self.selenium.find_element_by_id('lookup_id_supporting_bands').click()
|
||||
self.wait_for_popup()
|
||||
self.selenium.switch_to.window('id_supporting_bands')
|
||||
self.wait_page_loaded()
|
||||
link = self.selenium.find_element_by_link_text('Green Potatoes')
|
||||
self.assertIn('/band/98/', link.get_attribute('href'))
|
||||
link.click()
|
||||
|
@ -1179,8 +1174,8 @@ class RelatedFieldWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
main_window = self.selenium.current_window_handle
|
||||
# Click the Add User button to add new
|
||||
self.selenium.find_element_by_id('add_id_user').click()
|
||||
self.wait_for_popup()
|
||||
self.selenium.switch_to.window('id_user')
|
||||
self.wait_for('#id_password')
|
||||
password_field = self.selenium.find_element_by_id('id_password')
|
||||
password_field.send_keys('password')
|
||||
|
||||
|
@ -1196,8 +1191,8 @@ class RelatedFieldWidgetSeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
|
|||
|
||||
# Click the Change User button to change it
|
||||
self.selenium.find_element_by_id('change_id_user').click()
|
||||
self.selenium.switch_to_window('id_user')
|
||||
self.wait_page_loaded()
|
||||
self.wait_for_popup()
|
||||
self.selenium.switch_to.window('id_user')
|
||||
|
||||
username_field = self.selenium.find_element_by_id('id_username')
|
||||
username_value = 'changednewuser'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue