How do I add a time delay in a JS Step?
When testing, you often want to wait a certain period of time before executing the next process.
setTimeout() is used to add a time delay.
However, since JS Step is executed asynchronously, the following process will happen before waiting for the current process to complete if you use
setTimeout() in a JS Step as it is.
To avoid this, JS Step should return a
Promise object so that Autify waits for the asynchronous process to finish.
Please refer to the following reference article for an example that uses async / await.