From c8bd37a8606a89b6e09854ab5f3bbaa98e849408 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Thu, 28 Nov 2019 06:10:13 -0800 Subject: [PATCH] Fixed #31042 -- Removed AdminSeleniumTestCase.get_css_value() in favor of Selenium .is_displayed(). All instances of AdminSeleniumTestCase.get_css_value() were used to inspect the display property. --- django/contrib/admin/tests.py | 8 -------- tests/admin_widgets/tests.py | 16 ++++++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/django/contrib/admin/tests.py b/django/contrib/admin/tests.py index 5ea233ad5e..748e67fd3f 100644 --- a/django/contrib/admin/tests.py +++ b/django/contrib/admin/tests.py @@ -133,14 +133,6 @@ class AdminSeleniumTestCase(SeleniumTestCase, StaticLiveServerTestCase): with self.wait_page_loaded(): self.selenium.find_element_by_xpath('//input[@value="%s"]' % login_text).click() - def get_css_value(self, selector, attribute): - """ - Return the value for the CSS attribute of a DOM element specified by - the given selector. Uses the jQuery that ships with Django. - """ - return self.selenium.execute_script( - 'return django.jQuery("%s").css("%s")' % (selector, attribute)) - def select_option(self, selector, value): """ Select the