title: Javascript click() return undefined
body: <p>I try to simulate click on a link with javascript</p>
  
  <p>here is the code:</p>
  
  <pre><code>document.getElementsByClassName('link-a')[2].click();
  </code></pre>
  
  <p>When i try this </p>
  
  <pre><code>document.getElementsByClassName('link-a')[2];
  </code></pre>
  
  <p>I have the link that ai want to simulate a click but when i add the click() function it's return undefined and there is no click at all...</p>
  
  <p>can you help me please?</p>
  
  <p>Thank you for your help</p>