Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


Click a javascript button issue! PLEASE HELP filter_list
Author
Message
Click a javascript button issue! PLEASE HELP #1
Hey guys

A couple of months ago I decided to make a bot and I've been working on one for a while, but there's only one thing remaining and that's the most important one. The site code looks like this:
Code:
<a class="single_like_button btn3-wrap" onclick="openFbLWin_588158();">
                                            <span>&nbsp;</span><div class="btn3">Like</div></a>

And my code looks like this:
Code:
For Each elem As HtmlElement In WebBrowser1.Document.GetElementsByTagName("button")

                ' Check the attributtes you want

                If elem.GetAttribute("class") = "single_like_button btn3-wrap" Then

                    'Check even the text if you want

                    If elem.InnerText = "Like" Then

                        'Invoke your event

                        elem.InvokeMember("click")

                    End If

                End If

            Next
Do you got any ideas on how to click this button?
Help me earn more money by going to:
http://Shorten-U.info/FluffyNeedsHelp
[Image: banner1.gif]

Reply

RE: Click a javascript button issue! PLEASE HELP #2
Try this way
Code:
WebBrowser1.Document.Window.DomWindow.execscript("openFbLWin_588158();", "JavaScript")

Also, if you're making a bot, you shouldn't use a webbrowser control for it.

Reply







Users browsing this thread: 1 Guest(s)