From 10c5ea3e7c24ccd7d36421223f9cbad56429ded2 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Thu, 17 Mar 2016 17:47:02 +0000 Subject: [PATCH] Add a wait for the animation to complete during event creation. --- RIGS/test_functional.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RIGS/test_functional.py b/RIGS/test_functional.py index f37bf0bc..a874c9c7 100644 --- a/RIGS/test_functional.py +++ b/RIGS/test_functional.py @@ -324,7 +324,10 @@ class EventTest(LiveServerTestCase): '//select[@id="id_organisation"]//option[@selected="selected"]') self.assertEqual(obj.pk, int(option.get_attribute("value"))) - # Create veneue + # Create venue + wait = WebDriverWait(self.browser, 10) #setup WebDriverWait to use later (to wait for animations) + + wait.until(animation_is_finished()) add_button = self.browser.find_element_by_xpath( '//a[@data-target="#id_venue" and contains(@href, "add")]') add_button.click()