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

Method xpath_radio_pseudo

pyquery/cssselectpatch.py:222–233  ·  view source on GitHub ↗

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

(self, xpath)

Source from the content-addressed store, hash-verified

220 return xpath
221
222 def xpath_radio_pseudo(self, xpath):
223 """Matches all radio input elements::
224
225 >>> from pyquery import PyQuery
226 >>> d = PyQuery('<div><input type="radio"/></div>')
227 >>> d('input:radio')
228 [<input>]
229
230 ..
231 """
232 xpath.add_condition("@type = 'radio' and name(.) = 'input'")
233 return xpath
234
235 def xpath_text_pseudo(self, xpath):
236 """Matches all text input elements::

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected