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

Method xpath_text_pseudo

pyquery/cssselectpatch.py:235–246  ·  view source on GitHub ↗

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

(self, xpath)

Source from the content-addressed store, hash-verified

233 return xpath
234
235 def xpath_text_pseudo(self, xpath):
236 """Matches all text input elements::
237
238 >>> from pyquery import PyQuery
239 >>> d = PyQuery('<div><input type="text"/></div>')
240 >>> d('input:text')
241 [<input>]
242
243 ..
244 """
245 xpath.add_condition("@type = 'text' and name(.) = 'input'")
246 return xpath
247
248 def xpath_checkbox_pseudo(self, xpath):
249 """Matches all checkbox input elements::

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected