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

VS 2010 Reading sourcedata from element in webbrowser

$
0
0
Hello guys,

I really hope you can help me out. I'm trying to get data from an element. In order to get the right data i first had to select the right item in a listbox. I selected the right item, but when i write the data as string then its still the data of item one of the listbox. What am i doing wrong here?

Dim allelements As HtmlElementCollection
allelements = WebBrowser1.Document.GetElementsByTagName("a")

WebBrowser1.Document.GetElementById("training_graph_select_player").SetAttribute("selectedindex", 22)

For Each curElement As HtmlElement In allelements
If curElement.GetAttribute("OuterHtml").Contains("All") Then
curElement.InvokeMember("click")

Dim theElementCollection5 As HtmlElementCollection
theElementCollection5 = WebBrowser1.Document.GetElementsByTagName("div")
For Each curElement5 As HtmlElement In theElementCollection5

Dim controlName5 As String = curElement5.GetAttribute("id").ToString
Dim xxx1 As String

If controlName5 = "training_graph_container" Then
xxx1 = curElement5.InnerHtml.ToString()


Attachment 94381
Attached Images
 

Viewing all articles
Browse latest Browse all 27353

Trending Articles



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