I'm trying to use CasperJS to select both options in a multiple select in an HTML form:
<select id="bldgs" name="bldgs" multiple="multiple" size="6" autocomplete="off">
<option value="249759290">Southeast Financial Center - Annex</option>
<option value="245625689">Southeast Financial Center - Tower</option>
</select>
Casper code:
casper.each(testData, function(self) {
self.thenOpen('<link to form here>', function() {
this.echo("Successfully opened form.");
var name = testData[i];
this.fill('form#vendor', {
'orgnm': name,
'bldgs': ["249759290", "245625689"],
}, false);
this.echo("Inserted company " + testData[i]);
i++;
});
Everything else in the form is properly filled out, and when I try and select only one option from the multiselect it works fine. However, when I try and select both, neither of them get selected. This problem persists on other multiselect items too. I'm not sure what I'm doing wrong, since this seems to be the correct syntax according to the docs and all efforts at debugging this problem have failed. Any ideas?