See this page, for example: Tip: How to use an Input Dialog in a Recorder Script. Probably because this use case and mainly the runScript is undocumented, the author recommends a rather complicated usage of addScript.
What is missing in the docs then?
1) That runScript (equivalent of executeScript from Selenium 3.1+) can also store the result of JS execution (including calls to prompt()) to a variable, just like storeEval does. It just needs to contain a return JS statement, or the variable will be undefined.
2) That storeEval suppresses calls to prompt(). This goes against what was possible in Selenium IDE before it got removed (see SO for more details).
See this page, for example: Tip: How to use an Input Dialog in a Recorder Script. Probably because this use case and mainly the
runScript
is undocumented, the author recommends a rather complicated usage ofaddScript
.What is missing in the docs then?
1) That
runScript
(equivalent ofexecuteScript
from Selenium 3.1+) can also store the result of JS execution (including calls toprompt()
) to a variable, just likestoreEval
does. It just needs to contain areturn
JS statement, or the variable will beundefined
.2) That
storeEval
suppresses calls toprompt()
. This goes against what was possible in Selenium IDE before it got removed (see SO for more details).3) A working example for user input via
prompt()
in the Katalon Recorder Samples.