I want to automate the testing for a digital signature, which is a canvas element.

Can anyone provide me with sample code, which could be used.

I have tried, 

```
selenium.clickAt(),
driver.findElement(By.xpath("/html/body/form/div/canvas")).click();

```

both threw an element not found exception for me...

Source Code of the page, for the Canvas region:

```
<table>
<tr class="tdbg" valign="middle"  bgcolor="#D4D4D4" height="1px">
<td width="5%" bgcolor="#D4D4D4"></td>
<td width="90%" bgcolor="#D4D4D4">
  <div align="center" id="electronicSignImage">
    <div>Please use mouse to draw your Signature &nbsp;</div>
    <div id="ds" align="center">
      <iframe id="elecsign"  align='middle' style="border:1px #9E9E9E solid;
      padding:10px;" height='180' width='200' scrolling='no'
      src='http://<pdftest.anotherwebsite.com>//signature/index.php?signid=<something>'
      class="required" ></iframe>
      <input type="hidden" name="ds" value="<something">
    </div>
  </div>
</td>
<td width="5%"  bgcolor="#D4D4D4"></td>
</tr>
<tr class="tdbg" valign="middle"  bgcolor="#D4D4D4" >
  <td width="5%" height="1px" bgcolor="#D4D4D4">&nbsp;</td>
  <td  bgcolor="#D4D4D4" height="1px" width="80%" >&nbsp;</td>
  <td width="5%" height="1px" bgcolor="#D4D4D4">&nbsp;</td>
</tr>
</table>

```

Hope this helps!