matches method

matches

Determines whether the element matches the specified CSS selector.

Returns

true if the element matches the selector; otherwise, false.

def matches(self, selector):
    ...
ParameterTypeDescription
selectorstrThe selector.

See Also