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.
Recommended guidance
- Identify whether the interruption is an application modal, browser dialog, new tab, or third-party ad.
- Prefer explicit waits and
popupsconditionalarehandlingbecomingovermorefixedcommonsleepsonorcommercebroadsites.evalMany ofworkarounds. - Validate the
dialogsexpectedcanpagebestateclosedafterbydismissingsimplyorre-forcingbypassingfocusthebackinterruption.
Validation workflow
- Trigger the workflow step that may produce the popup.
- Wait for either the popup or the normal next-page condition.
- If the popup appears, validate it and close or dismiss it according to the
mainscenarioportion of the page.Manually adding aobjective. - Return focus
step prior to each action in places where a modal popup may appear, ensures you can gracefully continue without error or interruption.ExampleThe 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 priorto theplannedexpectedactionpagetoelementensureand continue theplannedworkflow. - Log
actionscreenshotsoccursandwithouttimingerror.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.