My form has two select boxes in which the user can pick countries to be included in the settings. The values of the available options look like this:
<option value="AU">Australia</option>
When the form is submitted, chrome reports the state of the select like this:
f_countries:selectedc
selectedcountries[]:AU
selectedcountries[]:AR
On casperjs I can use the following method to do things such as type in input boxes, etc., on the form. What I can't figure out is how to set the select form values to those listed above.
For example, say I wanted to set the selected countries to "US,CA,BR".
Here is what I use for other types of input on the forms.
this.fill('form#my_form', {
'username': 'joe',
'password': 'secret',
'f_countries:selectedc': [[ can't figure out what goes here ]]
}, true);
Question is: how do I use casperjs to set the values of selects on forms.