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

Method xpath_enabled_pseudo

pyquery/cssselectpatch.py:164–175  ·  view source on GitHub ↗

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

(self, xpath)

Source from the content-addressed store, hash-verified

162 return xpath
163
164 def xpath_enabled_pseudo(self, xpath):
165 """Matches all elements that are enabled::
166
167 >>> from pyquery import PyQuery
168 >>> d = PyQuery('<div><input value="foo" /></div>')
169 >>> d('input:enabled')
170 [<input>]
171
172 ..
173 """
174 xpath.add_condition(self._format_disabled_xpath(disabled=False))
175 return xpath
176
177 def xpath_file_pseudo(self, xpath):
178 """Matches all input elements of type file::

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected