'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`.
`message` can be used to override the default error message.
Key attributes for arbitrary elements are `id` and `name`. See
`introduction` for details about locating elements.'

@keyword
def element_should_contain(self, locator, expected, message=''):

    self.info(("Verifying    element    '%s'    contains    text    '%s'." % (locator, expected)))
    actual = self._get_text(locator)
    if (expected not in actual):
        if (not message):
            message = ("Element    '%s'    should    have    contained    text    '%s'    but    its    text    was    '%s'." % (locator, expected, actual))
        raise AssertionError(message)
