'Verifies text field identified by `locator` contains text `expected`.
`message` can be used to override default error message.
Key attributes for text fields are `id` and `name`. See `introduction`
for details about locating elements.'

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

    actual = self.element_finder.get_value(locator, 'text    field')
    if (expected not in actual):
        if (not message):
            message = ("Text    field    '%s'    should    have    contained    text    '%s'    but    it    contained    '%s'" % (locator, expected, actual))
        raise AssertionError(message)
    self.info(("Text    field    '%s'    contains    text    '%s'." % (locator, expected)))
