From 399aa72330d806d2cde36f3e8d0acce11b5f2f4a Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Mon, 5 Mar 2012 08:13:09 +0000 Subject: [PATCH] Enabled the existing admin Selenium tests to be run with Internet Explorer. Note that some tweaks had to be made, in particular as IE7 has limited capabilities regarding CSS selectors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17666 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/tests.py | 4 +- tests/regressiontests/admin_inlines/tests.py | 47 ++++++++++++-------- tests/regressiontests/admin_views/tests.py | 18 +++++++- tests/regressiontests/admin_widgets/tests.py | 12 +++-- 4 files changed, 56 insertions(+), 25 deletions(-) diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py index 9ad817d4a7d..2491fc65b19 100644 --- a/django/contrib/admin/tests.py +++ b/django/contrib/admin/tests.py @@ -79,7 +79,7 @@ class AdminSeleniumWebDriverTestCase(LiveServerTestCase): identified by the CSS selector `selector`. """ from selenium.common.exceptions import NoSuchElementException - options = self.selenium.find_elements_by_css_selector('%s option' % selector) + options = self.selenium.find_elements_by_css_selector('%s > option' % selector) for option in options: if option.get_attribute('value') == value: return option @@ -90,7 +90,7 @@ class AdminSeleniumWebDriverTestCase(LiveServerTestCase): Asserts that the