From 85327b0c101efc760a9eeabf70b97aebf55526d4 Mon Sep 17 00:00:00 2001 From: Prateek Jain Date: Sat, 20 Jun 2020 22:02:18 +0530 Subject: [PATCH] Add wait_for in selenium test --- securedrop/tests/functional/journalist_navigation_steps.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/securedrop/tests/functional/journalist_navigation_steps.py b/securedrop/tests/functional/journalist_navigation_steps.py index f04f1e6192b..484a6247fc1 100644 --- a/securedrop/tests/functional/journalist_navigation_steps.py +++ b/securedrop/tests/functional/journalist_navigation_steps.py @@ -338,6 +338,8 @@ def _admin_adds_a_user_with_invalid_username(self): self.safe_click_by_css_selector("button[type=submit]") + self.wait_for(lambda: self.driver.find_element_by_css_selector(".form-validation-error")) + error_msg = self.driver.find_element_by_css_selector(".form-validation-error") assert "Invalid username '{}'".format(invalid_username) in error_msg.text