def assertChromePolicyDownloadLinkIsConnected(self): """Helper to assert that chrome policy download links to download url.""" generic_page = UfOPageLayout(self.driver) download_button = generic_page.get_element( UfOPageLayout.CHROME_POLICY_HIDDEN_BUTTON) prefix = 'data:text/json,' self.assertTrue(download_button.get_attribute('href').startswith(prefix))
def assertLogoLinksToLandingPage(self): """Helper to assert the UfO logo is an anchor to the landing page.""" generic_page = UfOPageLayout(self.driver) logo_anchor = generic_page.get_element(UfOPageLayout.LANDING_ANCHOR) actual_landing_url = self.args.server_url + flask.url_for('landing') self.assertEquals(actual_landing_url, logo_anchor.get_attribute('href'))