Skip to main content

Sleep

The Sleep step in Snappit is used to pause the execution of the workflow for a defined amount of time. This is especially helpful when waiting for asynchronous page changes, animations, or external systems to settle before continuing with the next step.

Snappit Sleep Step


💤 Purpose

To introduce a deliberate delay in the workflow execution, giving the browser or web application time to complete dynamic processes like loading animations, transitions, or third-party integrations.


🧭 Behavior

  • Halts the workflow for a specific amount of time.
  • Time can be defined in seconds or milliseconds, depending on the level of precision required.
  • After the delay, the workflow proceeds to the next step automatically.

⚙️ Configuration

  • timeout: The amount of time to wait before moving on. You can specify:

    • 1000ms for 1 second (milliseconds)
    • 5s for 5 seconds (human-readable format)

✅ Use Cases

  • Waiting for animations or transitions to complete
  • Allowing time for external scripts to load
  • Providing a buffer after navigation before interacting with elements
  • Simulating real-user pauses in an automation flow

By using the Sleep step strategically, you can make your workflows more reliable and avoid premature interactions with unstable or loading UI components.