title: How to loop-click a button through developer console?
body: <p>I'm new to this.</p>
  
  <p>I wrote this code</p>
  
  <pre><code>var chars = ["a","b","c","d","e","f","g","h","i","j,","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
  for (var i = 0; i &lt; chars.length; i++) {
      for (var j = 0; j &lt; chars.length; j++) {
          var value = chars[i] + chars[j];
          document.getElementById("text").value = value;
          document.getElementById("submitBtn").click();
          console.log(value);
      }
  }
  </code></pre>
  
  <p>The page reloads if the click happens.</p>
  
  <p>I want the loop to wait until the page is fully loaded and they continue with next iteration. Right now it prints all the value and page reloads only once.</p>
  
  <p>I'm running this in Safari developer console.</p>