#NEWLINE# def submit_form( self , form , submit = None , **kwargs ) : #NEWLINE# #INDENT# 'Submit a form.\n\n        :param Form form: Filled-out form object\n        :param Submit submit: Optional `Submit` to click, if form includes\n            multiple submits\n        :param kwargs: Keyword arguments to `Session::send`\n\n        ' #NEWLINE# method = form . method . upper ( ) #NEWLINE# url = ( self . _build_url ( form . action ) or self . url ) #NEWLINE# payload = form . serialize ( submit = submit ) #NEWLINE# serialized = payload . to_requests ( method ) #NEWLINE# send_args = self . _build_send_args ( ** kwargs ) #NEWLINE# send_args . update ( payload ) #NEWLINE# response = self . session . request ( method , url , ** send_args ) #NEWLINE# self . _update_state ( response )