Using the Loop Form Actions

There are three Loop Form actions: Loop Field Values, For Each Option and For Each Radio Button corresponding to the three kinds form controls text input (INPUT elements with type "text" and TEXTAREA elements), options (SELECT elements) and radio buttons (INPUT elements with type "radio"). Watch the video below or read on to learn how to use these loops.

Video on the use of Loops in Forms

To loop over a form you need to decide which form controls to loop over and in which order (this will decide in which order your output values will be generated). When you have done this you insert a step for each of these with the corresponding Form action. This can be done by right clicking on the control in the Page view and choosing "Forms" | <form action> from the popup menu, where <form action> is the appropriate action, e.g. if the control is a text input control then you would choose "Forms" | "Loop Field Values".

Every time a Loop Form action is executed a value is changed in a form control element in the HTLM page. This corresponds to what you would have done manually in a browser and if the form control has a JavaScript event attached to it, this event would be fired and some JavaScript executed. In some cases this JavaScript may change the form, e.g. change the options of a SELECT element. If this is the case you must be careful and choose the right order in which to loop over the controls to ensure that the right options are available to the robot when it need them. Normally, if you follow the order that you would use when doing this manually in a browser it should work just fine.

Once all the Loop Form action steps has been inserted in the robot you should add a step with a Click action that clicks on one of the submit buttons of the form.