def css_property(name: str, value: str = None): if value: warnings.warn( 'passing second argument is deprecated; use have.css_property(foo).value(bar) instead', DeprecationWarning, ) return _match.element_has_css_property(name).value(value).not_ original = _match.element_has_css_property(name) negated = original.not_ def value(self, expected: str) -> Condition[Element]: return original.value(expected).not_ def value_containing(self, expected: str) -> Condition[Element]: return original.value_containing(expected).not_ def values(self, *expected: str) -> Condition[Collection]: return original.values(*expected).not_ def values_containing(self, *expected: str) -> Condition[Collection]: return original.values_containing(*expected).not_ negated.value = value negated.value_containing = value_containing negated.values = values negated.values_containing = values_containing return negated
def css_property(name: str, value: str = None): if value: warnings.warn( 'passing second argument is deprecated; use have.css_property(foo).value(bar) instead', DeprecationWarning) return match.element_has_css_property(name).value(value) return match.element_has_css_property(name)