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

Loop for a web bot

$
0
0
well, i'm working in a bot for a web page, i know how to get the values of things that i want, but i have a problem.
When i do that..
Code:

            Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
            For Each webpageelement As HtmlElement In allelements
                If webpageelement.GetAttribute("className") = "mi_class_name_asd" Then
                    frmPreciosEncontrados.Label23.Text = webpageelement.InnerText
                End If
            Next

I get the first value of a list of values, all of them have the same classname( in the code ' mi_class_name_asd', for using it in a string in other form.
What i want is to get ten values with the same classname and put it in different strings.

Idk how to do it..

Sorry if bad english, im spanish and my level of english is....
Thanks for all and i wait for a reply.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



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