MCPcopy Create free account
hub / github.com/gawel/pyquery / xpath_disabled_pseudo

Method xpath_disabled_pseudo

pyquery/cssselectpatch.py:151–162  ·  view source on GitHub ↗

Matches all elements that are disabled:: >>> from pyquery import PyQuery >>> d = PyQuery(' ') >>> d('input:disabled') [ ] ..

(self, xpath)

Source from the content-addressed store, hash-verified

149 )''' % (bool_op, bool_op, bool_op)
150
151 def xpath_disabled_pseudo(self, xpath):
152 """Matches all elements that are disabled::
153
154 >>> from pyquery import PyQuery
155 >>> d = PyQuery('<div><input disabled="disabled"/></div>')
156 >>> d('input:disabled')
157 [<input>]
158
159 ..
160 """
161 xpath.add_condition(self._format_disabled_xpath())
162 return xpath
163
164 def xpath_enabled_pseudo(self, xpath):
165 """Matches all elements that are enabled::

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected