title: Automatically click button on page load
body: <p>I'm a little stuck on creating an automatic page to press a 'log in' button which runs a javascript, submitting the form automatically isn't good enough as it simply doesn't log the user in (it's a javascript login system - as a test), instead, it will just return an error: <a href="http://prntscr.com/m1f1f6" rel="nofollow noreferrer">http://prntscr.com/m1f1f6</a> it needs to automatically on load 'press' the log in button: <a href="http://prntscr.com/m1f1ur" rel="nofollow noreferrer">http://prntscr.com/m1f1ur</a> in order to perform the action of sending to "./main.php" which has an 'isLoggedIn' function. </p>
  
  <pre><code>&lt;button class="btn btn btn-block" id="btnLoginMain"&gt;Log in&lt;/button&gt;
  </code></pre>
  
  <p>Thanks in advance!</p>