Skip to main content

Handle Asynchronous Pop-Ups in Scenario Editor

AsynchronousLast adsreviewed: September 22, 2026

Use this guidance when pop-ups, modals, ads, or focus-stealing elements appear unpredictably during Scenario Editor playback.

  • Identify whether the interruption is an application modal, browser dialog, new tab, or third-party ad.
  • Prefer explicit waits and popupsconditional arehandling becomingover morefixed commonsleeps onor commercebroad sites.eval Many ofworkarounds.
  • Validate the dialogsexpected canpage bestate closedafter bydismissing simplyor re-forcingbypassing focusthe backinterruption.

Validation workflow

  1. Trigger the workflow step that may produce the popup.
  2. Wait for either the popup or the normal next-page condition.
  3. If the popup appears, validate it and close or dismiss it according to the mainscenario portion of the page.

    Manually adding aobjective.

  4. Return focus step prior to each action in places where a modal popup may appear, ensures you can gracefully continue without error or interruption.

    Example

    The following site always displays a modal, at an unpredicted time. The site however discontinues trying to display once the user leaves the main page. The focus action is used prior to the plannedexpected actionpage toelement ensureand continue the plannedworkflow.

  5. Log actionscreenshots occursand withouttiming error.when popup behavior is intermittent.

ThisNote: canAvoid beold accomplishedDesigner-specific ineval onepatterns ofunless twoSupport ways:confirms they are still required for a legacy scenario.

Approach 1: Using Two Separate Steps

Approach 2: Using eval()

Sample Designer Script


Last updated: JulySeptember 03,22, 20232026

If you have any feedback on this topic, please contact us at documentation@appvance.ai.