Does a button need to be in a form inorder to perform click operation on it? I am using 

```
driver.findElement(By.tagName("button")).submit();

```

I also tried targeting that button with classname but I keep getting the below error.

Element was not in a form so couldn't submit
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: <http://seleniumhq.org/exceptions/no_such_element.html>