Wait until title in link security test
This commit is contained in:
parent
0cf6fb2c9d
commit
ee81aea2fa
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ import pytest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from selenium.webdriver.support.ui import WebDriverWait
|
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
|
from selenium.common.exceptions import NoSuchElementException
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
@ -55,7 +55,7 @@ class TestWeb:
|
||||||
|
|
||||||
def testLinkSecurity(self, browser, site_url):
|
def testLinkSecurity(self, browser, site_url):
|
||||||
browser.get("%s/1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr/test/security.html" % 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
|
assert browser.current_url == "%s/1EU1tbG9oC1A8jz2ouVwGZyQ5asrNsE4Vr/test/security.html" % site_url
|
||||||
|
|
||||||
# Switch to inner frame
|
# Switch to inner frame
|
||||||
|
|
Loading…
Reference in a new issue