--- title: submit comments: true description: '' --- Submits the DOM element from the previous command if it is a form. Submit can only be called on a single form. **The following events are fired during submit:** `submit` | | | |--- | --- | | **Returns** | the new DOM element(s) found by the command. | | **Timeout** | `cy.submit` will retry for the duration of the [`defaultCommandTimeout`](https://on.cypress.io/guides/configuration#timeouts). | # [cy.submit()](#usage) Submit a form. # Options Pass in an options object to change the default behavior of `cy.submit`. **cy.submit( *options* )** Option | Default | Notes --- | --- | --- `log` | `true` | whether to display command in command log # Usage ## Submit a form ```html
``` ```javascript // submits the form and performs all default actions // returns