Matches all elements that are selected:: >>> from pyquery import PyQuery >>> d = PyQuery(' ') >>> d('option:selected') [ ] ..
(self, xpath)
| 116 | return xpath |
| 117 | |
| 118 | def xpath_selected_pseudo(self, xpath): |
| 119 | """Matches all elements that are selected:: |
| 120 | |
| 121 | >>> from pyquery import PyQuery |
| 122 | >>> d = PyQuery('<select><option selected="selected"/></select>') |
| 123 | >>> d('option:selected') |
| 124 | [<option>] |
| 125 | |
| 126 | .. |
| 127 | """ |
| 128 | xpath.add_condition("@selected and name(.) = 'option'") |
| 129 | return xpath |
| 130 | |
| 131 | def _format_disabled_xpath(self, disabled=True): |
| 132 | """Format XPath condition for :disabled or :enabled pseudo-classes |
nothing calls this directly
no outgoing calls
no test coverage detected