Verification Steps
Check URL
Verify the current page URL matches expected patterns
Overview
The Check URL step allows you to verify that the current page URL matches your expected patterns. It supports exact matches, partial matches, and regex patterns, with options to use variables assigned from previous steps.
Form Fields
Field Name | Type | Required | Description |
---|---|---|---|
URL Pattern | text/dropdown | Yes | URL or pattern to match, or selection from variables declared in previous steps |
Use variables Toggle | toggle | No | Use variables from previous steps instead of manual entry |
Form Configuration
URL Pattern Input Options
The form provides two input modes:
Manual URL Entry (Default)
- URL Pattern: Standard text input field
- Supports environment variables using
{{VARIABLE_NAME}}
syntax - Can enter exact URLs, partial URLs, or regex patterns
- Supports wildcard patterns and path matching
Use Variables
- Use variables Toggle: Enable to show dropdown of assigned values
- URL Pattern: Dropdown showing variables from previous steps
- Available when you have declared variables in previous steps (Extract Value, Run JavaScript, API Request, etc.)
Examples
Exact URL Match
- URL Pattern:
https://example.com/dashboard
- Use variables Toggle: Disabled
Partial URL Match
- URL Pattern:
/user/profile
- Use variables Toggle: Disabled
Environment Variable URL
- URL Pattern:
{{BASE_URL}}/success
- Use variables Toggle: Disabled
Regex Pattern Match
- URL Pattern:
^https://example\.com/user/\d+$
- Use variables Toggle: Disabled
Use Variables
- Use variables Toggle: Enabled
- URL Pattern:
redirectUrl
(from dropdown of assigned variables)
Dynamic Path Verification
- Use variables Toggle: Enabled
- URL Pattern:
generatedPath
(assigned from previous step)
Best Practices
URL Matching Strategy
- Use exact matches for specific page verification
- Use partial matches for path-based verification
- Use regex patterns for dynamic URL components
- Consider query parameters and fragments in your patterns
Environment Variables
- Use
{{VARIABLE_NAME}}
syntax for environment-specific URLs - Keep base URLs in environment variables for different testing stages
- Verify variable names match exactly (case-sensitive)
Pattern Design
- Start with simple exact matches when possible
- Use regex for complex URL structures with dynamic parts
- Consider URL encoding and special characters
- Test patterns against various URL formats
Using Variables
- Use Use variables Toggle for dynamic URLs assigned during test execution
- Useful for verifying redirects or dynamic URL generation
- Ensure the variable assignment step completed successfully before verification
Common Issues
Pattern Mismatch
- Verify the URL pattern matches the actual browser URL exactly
- Check for case sensitivity in URL comparison
- Account for trailing slashes in URLs
- Consider protocol differences (http vs https)
Environment Variable Problems
- Ensure environment variables are defined in your test environment
- Use correct
{{VARIABLE_NAME}}
syntax with uppercase names - Verify variable values contain expected URL components
Regex Pattern Issues
- Escape special regex characters in URL patterns
- Test regex patterns with online regex validators
- Consider URL encoding of special characters
- Account for query parameters and anchors
Supatest Variables Issues
- Use variables Toggle only appears when you have declared variables in previous steps
- Ensure the variable assignment step executed successfully
- Verify the assigned variable contains a valid URL or pattern
Dynamic URL Components
- URLs with session IDs or timestamps may require pattern matching
- Consider query parameter order variations
- Account for URL encoding differences
- Handle single-page application routing
URL Matching Types
Exact Match
- Pattern:
https://example.com/dashboard
- Matches:
https://example.com/dashboard
only - Does not match:
https://example.com/dashboard/
orhttps://example.com/dashboard?tab=1
Partial Match
- Pattern:
/dashboard
- Matches any URL containing
/dashboard
in the path - Useful for path-based verification regardless of domain
Regex Match
- Pattern:
^https://example\.com/user/\d+$
- Matches:
https://example.com/user/123
- Flexible pattern matching for dynamic URL components
Query Parameter Handling
- Consider whether query parameters should be included in verification
- Use regex patterns for flexible query parameter matching
- Account for parameter order variations
Related Steps
- Navigate - For navigating to URLs before verification
- Extract Value - For extracting URLs to verify later
- Wait for Element - For waiting on page load after navigation