Make WebBrowser click a button on a webpage with a specific class ONCE in VB.net
问题 I'm trying to make the webbrowser click on a specific button within a webpage: The html code for the button is something like <a class="btn btn-large play"> and the code I have so far to click this button is: For Each Element As HtmlElement In WebBrowser2.Document.GetElementsByTagName("a") If Element.OuterHtml.Contains("btn btn-large play") Then Element.InvokeMember("click") End If This works, but it makes the Webbrowser click the button again and again. Any idea how I can only make it do so