File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
tests/scrolling_panning_zooming Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
import pytest
2
+ from selenium .common .exceptions import TimeoutException
2
3
from selenium .webdriver import Firefox
3
4
4
5
from modules .browser_object import Navigation , PanelUi
5
- from modules .page_object import AboutConfig , AboutPrefs , GenericPage
6
+ from modules .page_object import AboutPrefs , GenericPage
6
7
7
8
8
9
@pytest .fixture ()
@@ -74,10 +75,13 @@ def reject_consent_page(web_page: GenericPage):
74
75
"""
75
76
reject consent page. scroll to rejection button if necessary.
76
77
"""
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
81
85
82
86
83
87
@pytest .mark .ci
You can’t perform that action at this time.
0 commit comments