code: def get_text(self, locator):
          
          text = self._get_text(locator)
          self._info("Element '%s' text is '%s' " % (locator, text))
          return text
docs: Get element text (for hybrid and mobile browser use `xpath` locator, others might cause problem)
  
          Example:
  
          | ${text} | Get Text | //*[contains(@text,'foo')] |
  
          New in AppiumLibrary 1.4.