HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(webBrowser.DocumentText);
HtmlNode n = doc.DocumentNode.SelectSingleNode("//*[contains(@class, 'checkbox')]");
<table class="list" cellspacing="0">
<tbody>
<tr>
<th width="45" class="checkAll"><input title="Select all" class="checkbox" type="checkbox" value=""></th>
<th><span>Account</span></th>
<th><span>Target system</span></th>
</tr>
<tr class="checkable">
<td><input name="item1" class="checkbox" type="checkbox"></td>
<td><span>sometext1</span></td>
<td><span>system1</span></td>
</tr>
<tr class="checkable odd">
<td><input name="item2" class="checkbox" type="checkbox"></td>
<td><span>sometext2</span></td>
<td><span>stystem2</span></td>
</tr>
<tr class="foot">
<td colspan="4"><input name="SUBMIT" class="submit" type="submit" value="Unlock"></td>
</tr>
</tbody>
</table>
I am trying to click the first checkbox that says "Select all" so that all the other checkboxes below are selected.
I think my C# code is suppose to load the HtmlNode but I can't figure out how to click it.
Any suggestions would be helpful.