I'm creating a GreaseMonkey script that will auto login to a page as long as the user has saved their username and password in the browser. It's pretty simple, it's just checks to make sure that the username field and the password field are not blank and then it clicks the login button automatically.
Every now and then I was running in to an issue to where it didn't login. The page loaded and just sat there. I assumed it was simply due to the page not being fully loaded when the check of the username and password fields were done.
Because of this, I added this to my script.
window.addEventListener(load, Login(), false);
My question is... Will this actually wait for the browser to auto-fill those fields before attempting to login or is the page loading and the browser populating those fields 2 different actions?