i am using visual basic 12.there is a web browser in my form.İ want to click it but i have a problem.The button is a javascript button.so this code doesn't work:
WebBrowser1.Document.All("button id").InvokeMember("click")
Here is the hmtl of button.How can i click it.
<a class="single_like_button btn3-wrap" onclick="openFbLWin_407311();">
<span> </span><div class="btn3">Like</div></a>
Three options:
Execute the javascript function itself directly
Edit: Thanks to pquest for pointing out you can execute the javascript function directly with:
More complicated (and not really necessary) :
Search through all A elements using InnerHTML
Have a look at the following question: Click an HTML link inside a WebBrowser Control
In your case, based on that link, something like this:
Search through all A elements using ClassName
All Three Methods:
VB.net