MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / get_labels

Method get_labels

thirdparty/clientform/clientform.py:1636–1657  ·  view source on GitHub ↗

Return all labels (Label instances) for this item. For items that represent radio buttons or checkboxes, if the item was surrounded by a tag, that will be the first label; all other labels, connected by 'for' and 'id', are in the order that appear in the HTML

(self)

Source from the content-addressed store, hash-verified

1634 control.items.append(self)
1635
1636 def get_labels(self):
1637 """Return all labels (Label instances) for this item.
1638
1639 For items that represent radio buttons or checkboxes, if the item was
1640 surrounded by a <label> tag, that will be the first label; all other
1641 labels, connected by 'for' and 'id', are in the order that appear in
1642 the HTML.
1643
1644 For items that represent select options, if the option had a label
1645 attribute, that will be the first label. If the option has contents
1646 (text within the option tags) and it is not the same as the label
1647 attribute (if any), that will be a label. There is nothing in the
1648 spec to my knowledge that makes an option with an id unable to be the
1649 target of a label&#x27;s for attribute, so those are included, if any, for
1650 the sake of consistency and completeness.
1651
1652 """
1653 res = []
1654 res.extend(self._labels)
1655 if self.id:
1656 res.extend(self._control._form._id_to_labels.get(self.id, ()))
1657 return res
1658
1659 def __getattr__(self, name):
1660 if name=="selected":

Callers 6

get_itemsMethod · 0.45
get_value_by_labelMethod · 0.45
possible_itemsMethod · 0.45
get_labelsMethod · 0.45
__setattr__Method · 0.45
_find_controlMethod · 0.45

Calls 2

extendMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected