def get_me(self) -> dict: """Get Twitter profile of authenticated user :return: user profile as dictionary or `None` """ data = self._me._json if self._me else None # pylint: disable=W0212 notebook_json(data) return data
def get_user_profile(self, username: str = None) -> dict: """Get user's Twitter profile :param username: whose profile to get :return: profile as dictionary """ required_param(username, "get_user_profile") try: profile = self.api.get_user(username) data = profile._json # pylint: disable=W0212 notebook_json(data) return data except TweepError: return None
def get_element_status(self, locator: str) -> dict: """Return dictionary containing element status of: - visible - enabled - disabled - focused ``locator`` element locator """ status_object = dict() status_object["visible"] = self.is_element_visible(locator) status_object["enabled"] = self.is_element_enabled(locator) status_object["disabled"] = self.is_element_disabled(locator) status_object["focused"] = self.is_element_focused(locator) notebook.notebook_json(status_object) return status_object
def get_element_status(self, locator: str) -> dict: """Return dictionary containing element status of: - visible - enabled - disabled - focused ``locator`` element locator Example: | &{res} | Get Element Status | class:special | | Log | ${res.visible} | | Log | ${res.enabled} | | Log | ${res.disabled} | | Log | ${res.focused} | """ status_object = dict() status_object["visible"] = self.is_element_visible(locator) status_object["enabled"] = self.is_element_enabled(locator) status_object["disabled"] = self.is_element_disabled(locator) status_object["focused"] = self.is_element_focused(locator) notebook.notebook_json(status_object) return status_object