mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Refs #33725 -- Replaced deprecated find_element_by_css_selector() with find_elements(By.CSS_SELECTOR, …).
Follow up to90dcf27114
and2ccc0b22db
.
This commit is contained in:
parent
f825536b5e
commit
1733c888f4
@ -148,13 +148,13 @@ class SeleniumTests(AdminSeleniumTestCase):
|
||||
self.assertEqual(toggle_button.get_attribute("aria-label"), "Toggle navigation")
|
||||
for link in self.selenium.find_elements(By.CSS_SELECTOR, "#nav-sidebar a"):
|
||||
self.assertEqual(link.get_attribute("tabIndex"), "0")
|
||||
filter_input = self.selenium.find_element_by_css_selector("#nav-filter")
|
||||
filter_input = self.selenium.find_element(By.CSS_SELECTOR, "#nav-filter")
|
||||
self.assertEqual(filter_input.get_attribute("tabIndex"), "0")
|
||||
toggle_button.click()
|
||||
# Hidden sidebar is not reachable via keyboard navigation.
|
||||
for link in self.selenium.find_elements(By.CSS_SELECTOR, "#nav-sidebar a"):
|
||||
self.assertEqual(link.get_attribute("tabIndex"), "-1")
|
||||
filter_input = self.selenium.find_element_by_css_selector("#nav-filter")
|
||||
filter_input = self.selenium.find_element(By.CSS_SELECTOR, "#nav-filter")
|
||||
self.assertEqual(filter_input.get_attribute("tabIndex"), "-1")
|
||||
main_element = self.selenium.find_element(By.CSS_SELECTOR, "#main")
|
||||
self.assertNotIn("shifted", main_element.get_attribute("class").split())
|
||||
@ -192,12 +192,12 @@ class SeleniumTests(AdminSeleniumTestCase):
|
||||
# Hidden sidebar is not reachable via keyboard navigation.
|
||||
for link in self.selenium.find_elements(By.CSS_SELECTOR, "#nav-sidebar a"):
|
||||
self.assertEqual(link.get_attribute("tabIndex"), "-1")
|
||||
filter_input = self.selenium.find_element_by_css_selector("#nav-filter")
|
||||
filter_input = self.selenium.find_element(By.CSS_SELECTOR, "#nav-filter")
|
||||
self.assertEqual(filter_input.get_attribute("tabIndex"), "-1")
|
||||
toggle_button.click()
|
||||
for link in self.selenium.find_elements(By.CSS_SELECTOR, "#nav-sidebar a"):
|
||||
self.assertEqual(link.get_attribute("tabIndex"), "0")
|
||||
filter_input = self.selenium.find_element_by_css_selector("#nav-filter")
|
||||
filter_input = self.selenium.find_element(By.CSS_SELECTOR, "#nav-filter")
|
||||
self.assertEqual(filter_input.get_attribute("tabIndex"), "0")
|
||||
self.assertEqual(
|
||||
self.selenium.execute_script(
|
||||
|
Loading…
Reference in New Issue
Block a user