aboutsummaryrefslogtreecommitdiff
path: root/test/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/conftest.py')
-rw-r--r--test/conftest.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/conftest.py b/test/conftest.py
index 4eea714..b9c46b0 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -78,13 +78,12 @@ def webextension(driver, request):
driver.get('https://gotmyowndoma.in/')
ext_path = make_extension(Path(driver.firefox_profile.path), **ext_data)
addon_id = driver.install_addon(str(ext_path), temporary=True)
- WebDriverWait(driver, 10).until(
- EC.url_matches('^moz-extension://.*')
- )
+ get_url = lambda d: d.execute_script('return window.ext_page_url;')
+ ext_page_url = WebDriverWait(driver, 10).until(get_url)
+ driver.get(ext_page_url)
if navigate_to is not None:
- testpage_url = driver.execute_script('return window.location.href;')
- driver.get(testpage_url.replace('testpage.html', navigate_to))
+ driver.get(driver.current_url.replace('testpage.html', navigate_to))
yield