attr_contains

returns True if the attribute value contains the given value.

Arguments

Source


def attr_contains(self, attr, value):
    a = self.attr(attr)
    if a is not None:
        if a.find(value) != -1:
            return True
    return False