Execute inner scenarios in the loop using JavaScript