diff --git a/tests/admin_views/test_autocomplete_view.py b/tests/admin_views/test_autocomplete_view.py index 8f56dd8314..dc3789fc5b 100644 --- a/tests/admin_views/test_autocomplete_view.py +++ b/tests/admin_views/test_autocomplete_view.py @@ -576,7 +576,8 @@ class SeleniumTests(AdminSeleniumTestCase): def assertNoResults(row): elem = row.find_element(By.CSS_SELECTOR, ".select2-selection") - elem.click() # Open the autocomplete dropdown. + with self.select2_ajax_wait(): + elem.click() # Open the autocomplete dropdown. results = self.selenium.find_element(By.CSS_SELECTOR, ".select2-results") self.assertTrue(results.is_displayed()) option = self.selenium.find_element(