Skip to content

Instantly share code, notes, and snippets.

@alexgibson
Last active November 21, 2016 18:10
Show Gist options
  • Save alexgibson/2d2f91f2ab29efdf2b1e55ea2d8ece85 to your computer and use it in GitHub Desktop.
Save alexgibson/2d2f91f2ab29efdf2b1e55ea2d8ece85 to your computer and use it in GitHub Desktop.
_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