|
@@ -123,13 +123,21 @@ class AdminSeleniumTestCase(SeleniumTestCase, StaticLiveServerTestCase):
|
|
|
"""
|
|
|
Block until a new page has loaded and is ready.
|
|
|
"""
|
|
|
+ from selenium.common.exceptions import WebDriverException
|
|
|
from selenium.webdriver.common.by import By
|
|
|
from selenium.webdriver.support import expected_conditions as ec
|
|
|
|
|
|
old_page = self.selenium.find_element(By.TAG_NAME, "html")
|
|
|
yield
|
|
|
|
|
|
- self.wait_until(ec.staleness_of(old_page), timeout=timeout)
|
|
|
+ try:
|
|
|
+ self.wait_until(ec.staleness_of(old_page), timeout=timeout)
|
|
|
+ except WebDriverException:
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ pass
|
|
|
+
|
|
|
self.wait_page_ready(timeout=timeout)
|
|
|
|
|
|
def admin_login(self, username, password, login_url="/admin/"):
|