From ee81aea2fa70c5a6f01240a7975a97c7e5ed687a Mon Sep 17 00:00:00 2001 From: shortcutme Date: Tue, 20 Mar 2018 22:27:32 +0100 Subject: [PATCH] Wait until title in link security test --- src/Test/TestWeb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Test/TestWeb.py b/src/Test/TestWeb.py index 3e321756..7fba965c 100644 --- a/src/Test/TestWeb.py +++ b/src/Test/TestWeb.py @@ -4,7 +4,7 @@ import pytest try: from selenium.webdriver.support.ui import WebDriverWait - from selenium.webdriver.support.expected_conditions import staleness_of + from selenium.webdriver.support.expected_conditions import staleness_of, title_is from selenium.common.exceptions import NoSuchElementException except: pass @@ -55,7 +55,7 @@ class TestWeb: def testLinkSecurity(self, browser, site_url): browser.get("%s/1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr/test/security.html" % site_url) - assert browser.title == "ZeroHello - ZeroNet" + WebDriverWait(browser, 5).until(title_is("ZeroHello - ZeroNet")) assert browser.current_url == "%s/1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr/test/security.html" % site_url # Switch to inner frame