select_checkbox

returns input elements that are type checkbox.

Source


def select_checkbox(self):
    ret = pyNodeList()
    for node in self:
        t = node.attr('type')
        if t is not None and t.lower() == 'checkbox':
            ret.append(node)
    if len(ret) == 1: return ret[0]
    else: return ret