Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27222

click ONE image in webpage vb.net (its clicking all the images present on page)

$
0
0
so basically i need to click just one button that is a image in a website. but there are more than just one and the app clicks all of them..

I would like to click the first or second or thrid or fourth and so on(just one) , so i hope you understood that i want to chose wich of the buttons i want to click as they are the same...

Example: lets say a page have 10 buttons that are the same image. i want to click just the third from Up do Down (direction that i assume it reads the source of the page)

Code:

For Each ele As HtmlElement In WebBrowser1.Document.All

        If ele.GetAttribute("src").ToLower = "http://s.ytimg.com/yts/img/pixel-vfl3z5WfW.gif".ToLower Then

            ele.InvokeMember("click")
            Timer1.Enabled = True


        End If

    Next


Viewing all articles
Browse latest Browse all 27222

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>