I have been trying various methods to check a check box inside a
<div>
<table id="Table1" class="Foresttable" style="width: 100%;" cellpadding="3" cellspacing="0"
border="0">
<tbody>
<tr>
<td style="width: 25%;" align="left">
<input id="ChkDeclaration" type="checkbox" name="ctl00$ContentPlaceHolder1$ChkDeclaration">
<label for="ChkDeclaration">Yes I agree</label>
</td>
</tr>
</tbody>
</table>
</div>
but its failing.
Trial#1
Dim Actions1 As Selenium.Actions
Actions1.MoveToElement(d.FindElementById("ChkDeclaration")).Click.Perform
It says Object or block variable not set
Trial#2
dim ChkDeclaration0 as selenium.webelement
set ChkDeclaration0=driver.FindElementByID("ChkDeclaration")
ChkDeclaration0.Click
says not clickable at this point, some times WORKS
Trial#3
I tried sendkeys(Keys.Return)
also does not work
Pls give some clue how to do this.