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

VS 2010 Webbrowser click on Link (Dynamic)

$
0
0
Hello there. I have a very simple question. I have to click a link in my webbrowser, but the poblem is that the link isn't constant, and a part of it always changes. What remains the same is the word "logout". I have this code, but it doesn't work.

Code:

For Each link As HtmlElement In WebBrowser1.Document.Links
            If link.InnerText.Contains = "logout" Then
                WebBrowser1.Navigate(link.GetAttribute("href"))
                Exit For
            End If
        Next

What do i have to do? The link looks like this:

./ucp.php?mode=logout&battlegate_prod_sid=605bbad188f836f4c8b0a7959145074e

Thanks!

Viewing all articles
Browse latest Browse all 27360

Trending Articles



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