Wait until title in link security test

This commit is contained in:
shortcutme 2018-03-20 22:27:32 +01:00
parent 0cf6fb2c9d
commit ee81aea2fa
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 2 additions and 2 deletions

View File

@ -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