Call JavaScript Functions from Scenario Editor
HowLast reviewed: September 25, 2026
Use this article when a Scenario Editor test needs to call a JScustom JavaScript function from JS Edit & Play.
What changed in this article
- Replaced “Test Designer
BelowIDE”arewordingsomewithofScenario Editor terminology. - Corrected the
screenshotsoldontypohow“Fisttostep” and clarified that Include loads the script before customJS calls the function. - Separated examples for DPL-driven parameters, hard-coded parameters, and values captured with Store/getText so users can choose the right call
apattern.
Validation JSworkflow
- Add the JavaScript file with Include before calling the function.
- Call the function
definedwith customJS and pass parameters from DPL, constants, or captured variables. - Replay the step in JS Edit & Play and
executes in context.Fistthenstepruninthethis process isscenario toinclude the JS script using the Include statement followed by CustomJS call withconfirm the functionname.
BelowReview isnote: an example of calling a customJS function “appLogin” with multiple parameters passed to it (withKept the dataarticle comingas fromuseful aScenario DPLEditor file)

Belowmodernized isthe annaming example of function calls with singleand parameter (Hardcoded data)examples.
Functions can also be called with dynamic data being passed to it by using Store, getText and using the defined variable in the function call as a parameter.
Last updated: JulySeptember 25, 20232026
If you have any feedback on this topic, please contact us at documentation@appvance.ai.