has_attribute method

has_attribute(name)

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

Returns

True if has attribute with the name; otherwise, false.

def has_attribute(self, name):
    ...
Parameter Type Description
name str The attribute name.

See Also