Creating Journeys
Learn how to create browser journeys to monitor your critical user flows.
Creating Journeys
This guide walks you through creating a browser journey from scratch.
Two Ways to Create Journeys
- Visual Builder - Use the web interface to add steps
- Chrome Extension - Record actions directly in your browser
This guide covers the visual builder. For recording, see Recording Journeys.
Creating Your First Journey
Navigate to Journeys
- Go to your tracer dashboard
- Click Journeys in the sidebar
- Click New Journey
Set Basic Details
Configure the journey metadata:
Name: Login Flow Test
Description: Verifies users can log in successfully
Timeout: 30 secondsAdd Steps
Build your journey by adding steps. Each step type performs a specific action.
Example: Login Journey
| Step | Type | Configuration |
|---|---|---|
| 1 | Navigate | URL: https://app.example.com/login |
| 2 | Fill | Selector: #email, Value: [email protected] |
| 3 | Fill | Selector: #password, Value: •••••••• |
| 4 | Click | Selector: button[type="submit"] |
| 5 | Assert | Selector: .dashboard, Condition: visible |
Configure Schedule
Set how often the journey runs:
- Interval - Every 5, 10, 15, 30, or 60 minutes
- Cron - Custom schedule (e.g.,
0 9 * * *for 9 AM daily)
Select Locations
Choose where to run your journey:
- US East (Virginia)
- EU West (Ireland)
- Asia Pacific (Singapore)
Running from multiple locations helps identify regional issues and provides redundancy.
Save and Run
Click Create Journey to save. The first run will execute immediately.
Step Types
Navigation Steps
goto
Navigate to a URL.
Type: goto
URL: https://example.com/pagewait
Wait for a condition before continuing.
Type: wait
Condition: networkidle | load | domcontentloaded
Timeout: 5000msInteraction Steps
click
Click on an element.
Type: click
Selector: button.submitfill
Type text into an input field. Clears existing content first.
Type: fill
Selector: input[name="email"]
Value: [email protected]type
Type text character by character. Useful for autocomplete fields.
Type: type
Selector: input.search
Value: search query
Delay: 100ms # Between keystrokesselect
Select an option from a dropdown.
Type: select
Selector: select#country
Value: US # Option valuecheck
Check or uncheck a checkbox.
Type: check
Selector: input[type="checkbox"]
Checked: truehover
Hover over an element. Useful for revealing menus.
Type: hover
Selector: .dropdown-triggerAssertion Steps
expect_visible
Assert an element is visible on the page.
Type: expect_visible
Selector: .success-messageexpect_text
Assert an element contains specific text.
Type: expect_text
Selector: .welcome-message
Text: Welcome backexpect_url
Assert the current URL matches a pattern.
Type: expect_url
URL: https://example.com/dashboard
# Or use pattern matching:
Pattern: /dashboard/*Utility Steps
screenshot
Capture a screenshot at this point.
Type: screenshot
Name: after-login # Optional name
Full Page: true # Capture entire pagewait_for_timeout
Wait for a specific duration.
Type: wait_for_timeout
Duration: 2000msAvoid using wait_for_timeout for synchronization. Prefer wait with conditions or Playwright's built-in auto-waiting.
Using Variables
You can extract values from the page and use them in later steps:
# Step 1: Extract order ID
Type: extract
Selector: .order-id
Variable: orderId
# Step 2: Use in navigation
Type: goto
URL: https://example.com/orders/{{orderId}}See Using Variables for more details.
Handling Authentication
For journeys that require login, you have several options:
Option 1: Include Login Steps
Add login steps at the beginning of your journey:
Steps:
- goto: https://app.example.com/login
- fill: [#email, [email protected]]
- fill: [#password, {{PASSWORD}}]
- click: button[type="submit"]
- wait: networkidle
# ... rest of journeyOption 2: Use Environment Variables
Store credentials as variables:
- Go to Settings > Variables
- Add
LOGIN_EMAILandLOGIN_PASSWORD - Reference in steps:
{{LOGIN_EMAIL}}
Never hardcode production credentials. Always use variables for sensitive values.
Debugging Failed Journeys
When a journey fails:
- View the run details - Click on the failed run
- Check screenshots - See visual state at each step
- Download trace - Open in Playwright Trace Viewer
- Review console logs - Check for JavaScript errors
Common issues:
- Selector not found - Element doesn't exist or has changed
- Timeout - Page took too long to load
- Assertion failed - Expected content not present
Best Practices
-
Use data-testid attributes - More reliable than CSS classes
<button data-testid="submit-btn">Submit</button>Selector: [data-testid="submit-btn"] -
Keep journeys focused - One user flow per journey
-
Set appropriate timeouts - Account for network latency
-
Use meaningful names - Describe what the journey tests
-
Test in staging first - Validate journeys before production