def is_logged_in(self): elem = Element(self._browser, self._config.get_locator('login_link')) return not (elem.exists() and elem.is_visible())