Assert the form input with label (recommended), name or id has given value.

def input_has_value(self, field_name, value):
    """
    Assert the form input with label (recommended), name or id has given value.
    """
    text_field = find_any_field(world.browser,
                                DATE_FIELDS + TEXT_FIELDS,
                                field_name)
    if text_field is False:
        raise AssertionError(
            "Can not find a field named {!r}.".format(field_name))

    actual = text_field.get_attribute('value')
    if actual != value:
        raise AssertionError(
            "Field value expected to be {!r}, got {!r}.".format(
                value, actual))