I'm writing a small java application to automate report downloading using Selenium and the IE Webdriver. There are twenty fields which can be selected by a user in one area, and then by clicking a button, the field is moved from availabaleFieldsList to selectedFieldsList. An HTML sample is below.
Is it possible to execute some javascript on the page to insert all values in the selectedFieldsList? Similar to JavaScriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("document.getElementById('id').removeAttribute('attribute')");
<select name="BLANK.availableFieldsListArray" multiple="multiple" size="8" style="width:200;" id="availableFieldsListArray">
<option value="20~L0145~BLANK20~custom" selected="selected">Blank 20</option>
</select>
<select name="BLANK.selectedFieldsList" multiple="multiple" size="8" style="width:200;" id="selectedFieldsList">
<option value="1~L0117~BLANK1~null">Blank 1</option>
<option value="2~L0101~BLANK2~null">Blank 2</option>
<option value="3~L0119~BLANK3~null">Blank 3</option>
</select>