Last active
November 21, 2016 18:10
-
-
Save alexgibson/2d2f91f2ab29efdf2b1e55ea2d8ece85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_take_over_locator = (By.ID, 'fundraising_takeover') | |
_take_over_close_button_locator = (By.ID, 'close_takeover') | |
@property | |
def is_take_over_displayed(self): | |
return self.is_element_displayed(*self._take_over_locator) | |
# EOY fundraising takeover https://bugzilla.mozilla.org/show_bug.cgi?id=1316375 | |
def wait_for_page_to_load(self): | |
super(BasePage, self).wait_for_page_to_load() | |
self.wait.until(lambda s: self.is_take_over_displayed) | |
self.find_element(*self._take_over_close_button_locator).click() | |
self.wait.until(lambda s: not self.is_take_over_displayed) | |
return self |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment