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