Adam Verden
Adam Verden

Reputation: 1

VB.net Geckofx How to get link from Anchor text

Please i want to get the href value "/contact.php"

<a href="/contact.php">Contact</a>

For Each a In wb.Document.GetElementsByTagName("a")
        If a.InnerHtml = "Contact" Then
           'getting the href value
        End If
    Next

Upvotes: 0

Views: 361

Answers (1)

Ilya Sulimanov
Ilya Sulimanov

Reputation: 7836

Try to use

Dim value As String = a.GetAttribute("href");

Upvotes: 2

Related Questions