title: How to do a mouse click on a div or certain coordinates with console?
body: <p>I'm making some automation script. I could imitate the mouse-click using that automation tools but the coordinates changes over device so I rather make it through browser console.</p>
  
  <p>I could do it with normal <code>&lt;button&gt;</code> by using <code>element.click()</code> but I couldn't do it with <code>&lt;div&gt;</code></p>
  
  <p>What I want to do is click the start button (はじめから) using console like <code>element.click()</code>
  <a href="https://i.stack.imgur.com/pJgcw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pJgcw.jpg" alt="ss"></a></p>
  
  <p>you could try it <a href="http://game.granbluefantasy.jp/" rel="nofollow noreferrer">here</a></p>
  
  <p>So far, I have tried:</p>
  
  <pre><code>document.getElementById('start').click();
  </code></pre>
  
  <p>and</p>
  
  <pre><code>a = document.getElementById('start').getBoundingClientRect();
  document.elementFromPoint(((a.width / 2) + a.left), ((a.height / 2) + a.top)).click();
  </code></pre>
  
  <p>but nothing happens</p>
  
  <p>Is it possible to do this with browser console?</p>
  
  <p>Thanks in advance</p>