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

Method xpath_checkbox_pseudo

pyquery/cssselectpatch.py:248–259  ·  view source on GitHub ↗

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

(self, xpath)

Source from the content-addressed store, hash-verified

246 return xpath
247
248 def xpath_checkbox_pseudo(self, xpath):
249 """Matches all checkbox input elements::
250
251 >>> from pyquery import PyQuery
252 >>> d = PyQuery('<div><input type="checkbox"/></div>')
253 >>> d('input:checkbox')
254 [<input>]
255
256 ..
257 """
258 xpath.add_condition("@type = 'checkbox' and name(.) = 'input'")
259 return xpath
260
261 def xpath_password_pseudo(self, xpath):
262 """Matches all password input elements::

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected