Overview
Drivers extend Vulcn to support new recording targets beyond web browsers. This guide walks you through creating a custom driver.Driver Structure
A complete driver package:Step 1: Define the Driver
Step 2: Implement the Recorder
The recorder captures user interactions:Step 3: Implement the Runner
The runner replays sessions with payload injection:Step 4: Package Configuration
Step 5: Register the Driver
Users register your driver via config:Best Practices
Namespace Step Types
Namespace Step Types
Always prefix step types with your driver name to avoid conflicts:
- ✅
mydriver.click - ❌
click
Validate Configuration
Validate Configuration
Use Zod schemas to validate driver configuration and provide clear error
messages.
Mark Injectable Steps
Mark Injectable Steps
Clearly identify which steps are injection points using an
injectable
property.Handle Errors Gracefully
Handle Errors Gracefully
Catch and report errors per-step rather than failing the entire run.
Report Progress
Report Progress
Use
ctx.options.onStepComplete to report progress during long runs.Example: API Driver
Here’s a sketch of what an API driver might look like:Browser Driver Source
See the browser driver implementation for a complete example
