title: Invoke Angular2 click event on non InputElement
body: <p>I am testing a component which has a click input on a div.</p>
  
  <pre><code>&lt;div (click)="handleClick(someArgs)"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Now I want to validate the behaviour in a test. I tried using <code>.click()</code> on the native element:</p>
  
  <pre><code>const elem = fixture.debugElement.query(By.css('my-selector'));
  elem.nativeElement.click();
  // Check for desired changes
  </code></pre>
  
  <p>However this only works in specific browsers since <code>.click()</code> seems to only be defined for HTMLInputElements (<a href="https://stackoverflow.com/a/12764734/3388748">Relevant StackOverflow</a>). I get the following error <code>'undefined' is not a function (evaluating elem.nativeElement.click()')</code> for a couple browsers.</p>
  
  <p>What is the best way to invoke a click event on a non HTMLInputElement?</p>