Loopa igenom och fyll form-element i VB.net

Loopa igenom form-element i VB.net

Dim elements = WebBrowser1.Document.Forms(0).Document.GetElementsByTagName("input")

For Each element In elements

MsgBox(element.name)
If element.name = "email" Then element.SetAttribute("value", "mail@hotmail.com")

Next