
03-30-2012, 08:04 PM
|
 |
Freshman
|
|
Join Date: Jun 2011
Posts: 26
|
|
Hi AtmaWeapon, I tried
Code:
WebBrowser1.Document.GetElementById("exporterId").SetAttribute("value", "CSV file, time as rows")
and I also tried
Code:
WebBrowser1.Document.GetElementById("exporterId").InvokeMember("click", "CSV file, time as rows")
but neither select from the list. "exporterID" is the name of the list for certain. I'm slightly off on this and don't know what to add to the code to make the selection work. Any thoughts?
EDIT: I have also tried the GetElementByTagName with <option value> as its parameter
Code:
WebBrowser1.Document.GetElementsByTagName(ListTagName)
where ListTagName is a string but I don't understand what to do with it if it is found.
HTML and the selection I am after is in red:
Code:
<select name="exporterId" size="12" id="OutLst">
<optgroup label="SCREEN OUTPUT formats">
<option value="SERIES_HTML_TIME_AS_COLUMN">HTML table, time as columns</option>
<option value="SERIES_HTML_TIME_AS_ROW">HTML table, time as rows</option>
</optgroup>
<optgroup label="DOWNLOADABLE FILE formats">
<option value="SERIES_CSV_TIME_AS_COLUMN">CSV (comma-separated values) file, time as columns</option>
<option value="SERIES_SCSV_TIME_AS_COLUMN">SCSV (semicolon-separated values) file, time as columns</option>
<option value="SERIES_CSV_TIME_AS_ROW">CSV file, time as rows</option>
<option value="SERIES_SCSV_TIME_AS_ROW">SCSV, time as rows</option>
<option value="SERIES_CSV_TIME_AS_COLUMN_DATA_QUALITY">CSV file, time as columns with data quality indicators</option>
<option value="SERIES_SCSV_TIME_AS_COLUMN_DATA_QUALITY">SCSV file, time as columns with data quality indicators</option>
<option value="SERIES_CSV_TIME_AS_ROW_DATA_QUALITY">CSV file, time as rows with data quality indicators</option>
<option value="SERIES_SCSV_TIME_AS_ROW_DATA_QUALITY">SCSV file, time as rows with data quality indicators</option>
</optgroup>
</select>
|
Last edited by _Mordred_; 03-31-2012 at 02:04 AM.
|