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]

```
You can also use `JQuery` to call `trigger()` on `click` event to achieve this:

```js
$(document).ready(function(){
  //this is just to verify that click works
  $('.recaptcha-submit.btn.btn-lg.btn-fill.btn-primary').click(function(){
    console.log('clicked');
  });

  $('.recaptcha-submit.btn.btn-lg.btn-fill.btn-primary').trigger('click');
});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="submit" class="recaptcha-submit btn btn-lg btn-fill btn-primary" value="Přihlaste se">
```