diff options
author | Tim Graham <timograham@gmail.com> | 2016-01-11 09:16:23 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-01-11 09:16:23 -0500 |
commit | 2ed2db2ea3246c7f985ddfbb780850a23e851f9d (patch) | |
tree | 4c45b756bd584c26735c81ada8c56db9ad1cff01 /tests/admin_widgets/tests.py | |
parent | 3d6474e1a50dbaf9684f7fb34bfccb77630f27be (diff) | |
download | django-2ed2db2ea3246c7f985ddfbb780850a23e851f9d.tar.gz |
Replaced selenium.find_element_by_css_selector where by_id is sufficient.
Diffstat (limited to 'tests/admin_widgets/tests.py')
-rw-r--r-- | tests/admin_widgets/tests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/admin_widgets/tests.py b/tests/admin_widgets/tests.py index 25c2e1ab15..c8297f4bc9 100644 --- a/tests/admin_widgets/tests.py +++ b/tests/admin_widgets/tests.py @@ -1068,9 +1068,9 @@ class HorizontalVerticalFilterSeleniumFirefoxTests(SeleniumDataMixin, AdminSelen for field_name in ['students', 'alumni']: from_box = '#id_%s_from' % field_name to_box = '#id_%s_to' % field_name - choose_link = '#id_%s_add_link' % field_name - remove_link = '#id_%s_remove_link' % field_name - input = self.selenium.find_element_by_css_selector('#id_%s_input' % field_name) + choose_link = 'id_%s_add_link' % field_name + remove_link = 'id_%s_remove_link' % field_name + input = self.selenium.find_element_by_id('id_%s_input' % field_name) # Initial values self.assertSelectOptions(from_box, @@ -1099,14 +1099,14 @@ class HorizontalVerticalFilterSeleniumFirefoxTests(SeleniumDataMixin, AdminSelen input.send_keys('a') self.assertSelectOptions(from_box, [str(self.arthur.id), str(self.jason.id)]) self.get_select_option(from_box, str(self.jason.id)).click() - self.selenium.find_element_by_css_selector(choose_link).click() + self.selenium.find_element_by_id(choose_link).click() self.assertSelectOptions(from_box, [str(self.arthur.id)]) self.assertSelectOptions(to_box, [str(self.lisa.id), str(self.peter.id), str(self.jason.id)]) self.get_select_option(to_box, str(self.lisa.id)).click() - self.selenium.find_element_by_css_selector(remove_link).click() + self.selenium.find_element_by_id(remove_link).click() self.assertSelectOptions(from_box, [str(self.arthur.id), str(self.lisa.id)]) self.assertSelectOptions(to_box, @@ -1124,7 +1124,7 @@ class HorizontalVerticalFilterSeleniumFirefoxTests(SeleniumDataMixin, AdminSelen # Check that pressing enter on a filtered option sends it properly # to the 'to' box. self.get_select_option(to_box, str(self.jason.id)).click() - self.selenium.find_element_by_css_selector(remove_link).click() + self.selenium.find_element_by_id(remove_link).click() input.send_keys('ja') self.assertSelectOptions(from_box, [str(self.jason.id)]) input.send_keys([Keys.ENTER]) |