code: def element_should_contain_text(self, locator, expected, message=''):
          
          self._info("Verifying element '%s' contains text '%s'."
                      % (locator, expected))
          actual = self._get_text(locator)
          if not expected in actual:
              if not message:
                  message = "Element '%s' should have contained text '%s' but "\
                            "its text was '%s'." % (locator, expected, actual)
              raise AssertionError(message)
docs: Verifies element identified by ``locator`` contains text ``expected``.
  
          If you wish to assert an exact (not a substring) match on the text
          of the element, use `Element Text Should Be`.
  
          Key attributes for arbitrary elements are ``id`` and ``xpath``. ``message`` can be used to override the default error message.
  
          New in AppiumLibrary 1.4.