Dim allewbpageelement As HtmlElementCollection = WebBrowser1.Document.All
For Each Webpageelement As HtmlElement In allewbpageelement
If Webpageelement.GetAttribute("name") = "car01Plate1" Then
Webpageelement.SetAttribute("value", plate.Text)
End If
If Webpageelement.GetAttribute("name") = "car01Plate2" Then
Webpageelement.SetAttribute("value", plate2.Text)
End If
If Webpageelement.GetAttribute("name") = "provCode" Then
Webpageelement.SetAttribute("value", numprovince.Text)
End If
'------------- ปุ่มคลิก -----------------
If Webpageelement.GetAttribute("src") = "images/btt-search-th.gif" Then
Webpageelement.InvokeMember("Click")
End If
Next