WebSocket Sessions
SendPad has first-class WebSocket support via .ws files. Use them interactively (connect, compose, send in real time) or run scripted sessions with assertions and extraction — just like .flow files.
Interactive mode
Section titled “Interactive mode”- Open a
.wsfile - Press
⌘Enterto connect - The Session Panel shows the message timeline in real time
- Type in the compose bar and press
Enterto send
Connections persist when you switch files — incoming messages buffer in the background. The header badge shows active connection count.
Scripted mode
Section titled “Scripted mode”Press ⌘⇧Enter to run all ### message blocks sequentially as a scripted test. Assertions and extractions work exactly like .flow files.
@url = wss://api.example.com/ws@headersAuthorization: Bearer {{API_TOKEN}}
### Authenticate> {"type": "auth", "token": "{{API_TOKEN}}"}# @expect within 5000< {"type": "auth_ok"}# @extract sessionId = $.session_id# @assert body contains "auth_ok"
### Subscribe> {"type": "subscribe", "channel": "prices"}# @expect within 3000< {"type": "subscribed"}# @assert body contains "subscribed"Connection identity
Section titled “Connection identity”Each (file path, environment) pair has its own connection. The same .ws file with different active environments creates separate, independent connections — useful for multi-client testing.
Session Panel
Section titled “Session Panel”The Session Panel (shown when a .ws file is active) shows:
- Connection status badge — Connecting / Connected / Disconnected / Reconnecting
- Message timeline — sent messages (→), received messages (←), system events
- Assertion badges — ✅ / ❌ per scripted step
- Compose bar — type and send ad-hoc messages
- Pipeline view — visual step-by-step progress for scripted runs
Reconnect
Section titled “Reconnect”Enable auto-reconnect with exponential backoff:
@url = wss://api.example.com/ws@reconnect onGlobal reconnect defaults live in Settings → WebSocket: initial delay, max delay, max attempts (0 = infinite). While reconnecting, the Session Panel shows a live countdown and a Cancel reconnect button.
Keyboard shortcuts
Section titled “Keyboard shortcuts”| Key | Action |
|---|---|
⌘Enter | Connect (if disconnected) |
⌘Enter | Disconnect (if connected) |
⌘⇧Enter | Run all steps (scripted mode) |
Enter | Send from compose bar |
⇧Enter | Newline in compose bar |
See the .ws file format reference for the full syntax including all directives, authentication patterns, and binary frame support.