capybara/virtualenv/lib/python2.7/site-packages/lxml/html/__init__.py
def form_values(self):
        """
        Return a list of tuples of the field values for the form.
        This is suitable to be passed to ``urllib.urlencode()``.
        """
        results = []
        for el in self.inputs:
            name = el.name
            if not name:
                continue
            tag = _nons(el.tag)
            if tag == 'textarea':
                results.append((name, el.value))
            elif tag == 'select':
                value = el.value
                if el.multiple:
                    for v in value:
                        results.append((name, v))
                elif value is not None:
                    results.append((name, el.value))
            else:
                assert tag == 'input', (
                    "Unexpected tag: %r" % el)
                if el.checkable and not el.checked:
                    continue
                if el.type in ('submit', 'image', 'reset'):
                    continue
                value = el.value
                if value is not None:
                    results.append((name, el.value))
        return results
def form_values(self):
        """
        Return a list of tuples of the field values for the form.
        This is suitable to be passed to ``urllib.urlencode()``.
        """
        results = []
        for el in self.inputs:
            name = el.name
            if not name:
                continue
            tag = _nons(el.tag)
            if tag == 'textarea':
                results.append((name, el.value))
            elif tag == 'select':
                value = el.value
                if el.multiple:
                    for v in value:
                        results.append((name, v))
                elif value is not None:
                    results.append((name, el.value))
            else:
                assert tag == 'input', (
                    "Unexpected tag: %r" % el)
                if el.checkable and not el.checked:
                    continue
                if el.type in ('submit', 'image', 'reset'):
                    continue
                value = el.value
                if value is not None:
                    results.append((name, el.value))
        return results
def form_values ( self ) : results = [ ] for el in self . inputs : name = el . name if not name : continue tag = _nons ( el . tag ) if tag == 'textarea' : results . append ( ( name , el . value ) ) elif tag == 'select' : value = el . value if el . multiple : for v in value : results . append ( ( name , v ) ) elif value is not None : results . append ( ( name , el . value ) ) else : assert tag == 'input' , ( "Unexpected tag: %r" % el ) if el . checkable and not el . checked : continue if el . type in ( 'submit' , 'image' , 'reset' ) : continue value = el . value if value is not None : results . append ( ( name , el . value ) ) return results
Return a list of tuples of the field values for the form.
        This is suitable to be passed to ``urllib.urlencode()``.
Return a list of tuples of the field values for the form . This is suitable to be passed to urllib . urlencode () .