For-Each Loop Command

Having a for-each loop would be a nice command to have as it would remove the need of creating a counter whenever a for-each is created using the while command.

Usually, one would only want to use a counter if there is an explicit amount of times you would like to loop, but for many cases, one would like to go through all values (whether it be stored in a CSV or a JS array stored using executeScript). Having this new command would cut down on how many commands would be required to loop in the scenario mentioned.

If it helps, SIDE has a ‘foreach’ command:

This makes good sense, added to todo list.

Mentioning SIDE is always a plus, since we try to maintain Selenium IDE SIDE compatibility for the basic command structure. There is no need to reinvent the wheel.

1 Like