Welcome! This project demonstrates how to automate parking ticket payments using Stagehand.
To use Stagehand, run npx create-browser-app@latest
in your terminal or check out the Browserbase Stagehand Quickstart on GitHub
This automation script helps you pay parking tickets on the San Francisco Municipal Transportation Agency website. It uses Stagehand, an SDK built on top of Playwright that provides AI-powered automation capabilities.
-
Run
npx create-browser-app
to create a new project:npx create-browser-app@latest sf-parking-payment
-
Copy
.env.example
to.env
and update with your credentials:cp .env.example .env
Required credentials in .env:
BROWSERBASE_PROJECT_ID="YOUR_BROWSERBASE_PROJECT_ID" BROWSERBASE_API_KEY="YOUR_BROWSERBASE_API_KEY" OPENAI_API_KEY="THIS_IS_OPTIONAL_WITH_ANTHROPIC_KEY" ANTHROPIC_API_KEY="THIS_IS_OPTIONAL_WITH_OPENAI_KEY"
-
Install dependencies:
npm install
-
Run the script:
npm run start
- Navigates to the SF Municipal Transportation Agency payment portal
- Enters license plate information
- Selects tickets to pay
- Fills out payment information using Stagehand's AI-powered form filling
Note: This is a demo script using test credit card numbers. Please update the payment information with real data when using it.