Overview

The WAIT_FOR_URL step pauses test execution until the browser URL matches a specified pattern. This is essential for handling redirects, asynchronous navigation, and ensuring tests continue at the correct location.

Parameters

description
string
required
Description of what URL pattern to wait for
pattern
string
required
URL pattern to match. Can be a glob pattern or regex depending on matcherType.
matcherType
enum
default:"GLOB"
Type of pattern matching:
  • GLOB - Use glob patterns (e.g., */dashboard/*)
  • REGEX - Use regular expressions
timeout
number
default:"10000"
Maximum time to wait for URL match (in milliseconds)

Behavior

  1. Current URL Check: Gets the current browser URL
  2. Pattern Matching: Applies the pattern based on matcher type
  3. Polling: Continuously checks URL until match or timeout
  4. Success/Timeout: Proceeds when matched or fails on timeout

Common Use Cases

  • Waiting for redirects after login
  • Confirming navigation to success pages
  • Handling OAuth callbacks
  • Waiting for dynamic URL parameters
  • Verifying multi-step form progression
  • Ensuring SPA route changes complete

Error Handling

The step will fail if:
  • The URL doesn’t match the pattern within the timeout period
  • The pattern is invalid (for regex mode)
  • The browser navigation fails
Error messages show the current URL and expected pattern to help debug matching issues.