title: Simulate click javascript to element by class
body: <p>I am using execelementasync in c#.</p>
  
  <p>I want to use JavaScript too simulate a click to this button:</p>
  
  <pre><code>&lt;a class="btn confirm" href="#"&gt;
    &lt;h5&gt;
      Begin
    &lt;/h5&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>string jsScriptB = System.Xml.Linq.XElement.Parse(@"&lt;js&gt;&lt;![CDATA[ document.getElementByClassName('btn confirm').click();]]&gt;&lt;/js&gt;").Value;
              browser.ExecuteScriptAsync(jsScriptB);
  </code></pre>
  
  <p>I am really not sure what is going wrong but the button does not click. </p>
  
  <p><strong>Question:</strong> How can I click that button using JavaScript</p>