- Scale form automation across concurrent sessions without managing infrastructure
- Persist login state across form workflows with browser contexts
- Browse protected sites with Verified
- Debug failed submissions with session recordings and live views
Looking to deploy form automation as an API? Functions let you package form automation workflows as cloud functions that can be invoked via webhook or API call, perfect for integrating form submissions into your applications.
Implementation
1
Create a session
Create a Browserbase session and authenticate if needed. Use browser contexts to persist authentication across pages.
2
Navigate to the form
Go to the target page and wait for form elements to fully load before interacting with them.
3
Fill form fields
Identify and populate form elements (text inputs, dropdowns, radio buttons, and checkboxes) with your data.
4
Submit and verify
Trigger the submit button and check for success messages or validation errors.
Template
Get started quickly with a ready-to-use form filling template.Form Filling
Clone, configure, and run in minutes
Example: Automating a Google form
To demonstrate how to automate form submissions using Browserbase, you can use a sample Google Form designed specifically for this tutorial: Google Form This form collects responses in various formats:- Text input
- Radio button
- Checkboxes
Code example
- Node.js
- Python
This example form is for testing purposes - feel free to submit responses multiple times while experimenting.
Best practices
Wait for form elements to load
Target specific form elements withwaitForSelector rather than using arbitrary timeouts. This ensures your automation proceeds only when the form is ready.
- Node.js
- Python
Handle multi-step and dynamic forms
Forms that reveal fields based on previous selections need sequential interaction. Wait for each new section to render before continuing.- Node.js
- Python
Persist authentication with contexts
Use browser contexts to save login state across form automation runs, so you don’t need to re-authenticate each time.- Node.js
- Python
Verify submission success
Check for confirmation messages, URL changes, or response status after submitting a form.- Node.js
- Python
Next steps
Session live view
Learn how to watch test sessions in real time
Uploads
Learn how to upload files with Browserbase
Browserbase Functions
Deploy form automation as serverless functions