Q:

Selenium Webdriver finding an element (a button)

I need my script to click on a button.  So far I have tried this-
 driver.findElement(By.id("button_click")).click();

and HTML for this button is-
    <td class="Button">
<input class="btn" value="Click here to get started" name="button_click" onclick="this.form.action = '/servlet/servlet.Integration?lid=0076878676545487SVD2&eid=465124652J9ly&ic=1&retURL=%24848676854684y&wrapMassAction=1&scontrolCaching=1&linkToken=gituuiyiiuhjgd46etfjgioyyo8yo8ylihvTDNfLWhzdm5KLFlXWmtNR0po'; this.form.onsubmit = function() { return true }" title="page title" type="submit"/>
</td>

but it is not identifying the button right.  

A:

You try to search for your button by id, but your button has no id. The solution is to add an id to the button with the corresponding value:
    <td class="Button">
<input class="btn" value="Click here to get started" id="button_click" name="button_click" onclick="this.form.action = '/servlet/servlet.Integration?lid=0076878676545487SVD2&eid=465124652J9ly&ic=1&retURL=%24848676854684y&wrapMassAction=1&scontrolCaching=1&linkToken=gituuiyiiuhjgd46etfjgioyyo8yo8ylihvTDNfLWhzdm5KLFlXWmtNR0po'; this.form.onsubmit = function() { return true }" title="page title" type="submit"/>
</td>

If this is not an option, then you can search for elements by name, but then a list will be returned and you will need to choose the correct element from there, which is pretty simple if there is a single element.

