A simple login script sometimes work and sometimes doesn't

Viewed 342

I have the following code I execute in Chrome with Tampermonkey, which I use to login to digitalocean.com.

setTimeout (function() {
document.querySelector("input[type=submit]").click();
}, 3000);

For some reason, this code sometimes work and sometimes it doesn't: That is, sometimes I'm logged in and sometimes (most cases) I get DigitalOcean's 404 webpage.

My login details are already saved in local storage and appear on the form.

By principle, this problem can be reproduced by registering to DigitalOcean, installing Tampermonkey, and executing the code with it, with the match:

https://cloud.digitalocean.com/login*

Might something be missing to ensure human-like behavior in the eyes of the machine?

2 Answers
Related