I need to run some code on a website and once it finishes, I need to return the data from the callback:
The problem is that the "Custom JavaScript code" block finishes before the result is ready and nothing gets returned to the variable.
How can I solve this?
JavaScript:
doSomething().then(function(token) {
return token;
});
How can I solve this?