Skip to content

Commit 1d793ad

Browse files
committed
perhaps the consent page not appearing in CI?
1 parent 7be7791 commit 1d793ad

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tests/scrolling_panning_zooming/test_zoom_text_only.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import pytest
2+
from selenium.common.exceptions import TimeoutException
23
from selenium.webdriver import Firefox
34

45
from modules.browser_object import Navigation, PanelUi
5-
from modules.page_object import AboutConfig, AboutPrefs, GenericPage
6+
from modules.page_object import AboutPrefs, GenericPage
67

78

89
@pytest.fixture()
@@ -74,10 +75,13 @@ def reject_consent_page(web_page: GenericPage):
7475
"""
7576
reject consent page. scroll to rejection button if necessary.
7677
"""
77-
if web_page.element_clickable("yahoo-consent-page-scroll"):
78-
web_page.click_on("yahoo-consent-page-scroll")
79-
web_page.wait.until(lambda _: web_page.element_clickable("yahoo-reject-cookie"))
80-
web_page.click_on("yahoo-reject-cookie")
78+
try:
79+
if web_page.element_clickable("yahoo-consent-page-scroll"):
80+
web_page.click_on("yahoo-consent-page-scroll")
81+
web_page.wait.until(lambda _: web_page.element_clickable("yahoo-reject-cookie"))
82+
web_page.click_on("yahoo-reject-cookie")
83+
except TimeoutException:
84+
pass
8185

8286

8387
@pytest.mark.ci

0 commit comments

Comments
 (0)