Overview
The Check URL step verifies that the current browser URL matches your expected pattern. It’s essential for testing navigation flows, confirming redirects work correctly, and ensuring users land on the right pages after actions.When to Use Check URL
Use Check URL when you need to:- Verify navigation works: Confirm clicking links or buttons takes users to the correct pages
- Test redirects: Ensure login flows, payment completions, or error handlers redirect appropriately
- Check dynamic URLs: Validate URLs with user IDs, order numbers, or other dynamic parameters
- Confirm single-page app routing: Test that client-side routing updates URLs correctly
- Validate query parameters: Check that search filters, pagination, or state parameters appear in the URL
How It Works
Check URL reads the current browser URL and compares it against your expected pattern. It supports three matching strategies: exact matches (the URL must be identical), partial matches (the URL must contain your pattern), and regex matches (for complex dynamic URL structures). Unlike other verification steps that check page content, Check URL focuses solely on the address bar. This makes it perfect for testing navigation, routing, and redirect logic without needing to inspect page elements.Using the Check URL Step
When you add a Check URL step, you’ll configure:Specifying Your Expected URL
Check URL gives you three ways to define what URL you’re expecting: Static URL or Pattern Type the URL or pattern directly. You can use exact URLs, partial paths, or regex patterns depending on what you need to verify. Environment Variables Reference environment-specific URLs using{{VARIABLE_NAME}} syntax. Perfect for tests that run across staging and production environments with different base URLs.
Variables from Previous Steps
Toggle “Use variables” to select URLs you captured or generated earlier in your test. This appears when you’ve used steps like Extract Value, Run Python, or API Request. Ideal for verifying dynamic redirects or generated links.
Choosing Your Matching Strategy
The way Check URL interprets your pattern depends on what you provide: Exact Match: When you provide a complete URL likehttps://example.com/dashboard, Check URL verifies the browser URL matches exactly.
Partial Match: When you provide just a path like /dashboard, Check URL verifies that path appears anywhere in the URL.
Regex Match: When you provide a regex pattern like ^https://example\.com/user/\d+$, Check URL uses pattern matching for complex validation.
Real-World Examples
Confirming Successful Login Redirect
Validating Dynamic User Profile URLs
Environment-Aware URL Testing
Verifying Search Query Parameters
Testing Redirect After Form Submission
Confirming Error Page Navigation
Best Practices
Choose the Right Matching Strategy
- Use exact matches for specific page verification:
https://example.com/success - Use partial matches for path verification:
/checkout/complete - Use regex patterns for dynamic components:
^https://example\.com/order/[0-9A-Z]+$
Handle Environment Differences
- Store base URLs in environment variables:
{{BASE_URL}} - Test the same flow across staging and production
- Keep environment-specific configuration out of your test steps
Account for URL Variations
- Remember trailing slashes:
/dashboardvs/dashboard/ - Consider protocol differences:
http://vshttps:// - Watch for URL encoding in query parameters
- Account for query parameter order variations
Write Clear Regex Patterns
When using regex:- Escape special characters:
\.for literal dots - Use
\d+for numeric IDs - Use
[0-9A-Z]+for alphanumeric codes - Test your patterns with an online regex validator first
Troubleshooting
URL Doesn’t Match
Symptom: Test fails saying URL doesn’t match pattern Solution:- Check for trailing slashes (they must match exactly)
- Verify protocol matches (http vs https)
- Look for case sensitivity differences
- Check if query parameters or hash fragments affect the match
Environment Variable Not Working
Symptom: Pattern shows{{VARIABLE_NAME}} literally instead of substituting the value
Solution:
- Verify the variable is defined in your environment settings
- Check the variable name matches exactly (case-sensitive)
- Confirm you’re using the correct double-curly-brace syntax
Regex Pattern Issues
Symptom: Regex pattern doesn’t match when it should Solution:- Escape special regex characters in URLs (
\.for dots) - Test your regex pattern with an online validator
- Account for URL encoding (%20 for spaces, etc.)
- Remember that partial patterns might match unexpectedly
Dynamic URL Components
Symptom: URLs with session IDs or timestamps fail pattern matching Solution:- Use regex patterns to match dynamic parts:
/session/[a-z0-9]+ - Consider partial matches if only part of the URL matters:
/checkout - Extract and use variables for truly dynamic validation
Single-Page App Routing
Symptom: URL changes but Check URL runs before routing completes Solution:- Add a Wait for Element step to ensure page content loads
- Check URL after waiting for a page-specific element
- Account for hash-based routing (
#/dashboard) vs path-based routing
Related Steps
- Navigate - Navigate to URLs before verification
- Extract Value - Extract URLs or dynamic values to verify later
- Wait for Element - Wait for page load after navigation
- Click - Trigger navigation that you want to verify

