I Can't retrive element while using GetElementby Id in Webbrowser controller; Webpag code is:
<tr class="tb_item02" align="left">
<td width="15%" class="tb_title" align="right">Set as :</td>
<td width="35%">
<select id="set_AS" name="set_AS" class="select">
<option value=""></option>
<option value="Yes">Yes</option>
<option value="No" selected="">No</option>
</select>
</td>
<td width="15%" class="tb_title" align="right">Re-Generate:</td>
<td width="35%">
<select id=" Regenerate" name="Regenerate" class="select">
<option value=""></option>
<option value="Yes">Yes</option>
<option value="No" selected="">No</option>
</select>
</td>
</tr>
As I try to get set_AS
Element by:
HtmlElement reportDropDown = wbrsr.Document.GetElementById("set_AS");
HtmlElementCollection elCol = reportDropDown.GetElementsByTagName("option");
reportDropDown
stays null
and elcol
is throwing:
Object reference not set to an instance of an object.
Any suggestion what am I missing here?