Question: I'd like to complete an autologin script, but I need to find and click a button without ID or Name.

```
<input type="submit" class="recaptcha-submit btn btn-lg btn-fill btn-primary" value="Přihlaste se">

```

How can I find such element using javascript?

thanks

Answer: 
You can use the `document.getElementsByClassName` method to search by class name.

From your piece of code it seems that `recaptcha-submit` would be unique to that input, so you can search by it:

```
document.getElementsByClassName('recaptcha-submit')[0]

```
Thanks H77 for working solution:

```
var loginbtn = document.querySelector("#login > form > div.form-group.button-group > input").click();

```