登录到网站GeckoWebbrowser

时间:2018-07-22 13:45:05

标签: .net vb.net

如何使用GetElementsTagName通过GeckoWebBrowser登录该站点?

<input type="text" name="usernames" placeholder="Username" class="form-control" autocomplete="false">

我的代码:

Dim elemlogin As GeckoElementCollection = GeckoWebBrowser1.Document.GetElementsByTagName("input")
    Dim geckocoll As GeckoElementCollection = elemlogin.GetElementsByName("username")
    For Each o As GeckoElement In geckocoll
        o.InnerHtml = TextBox1.Text
    Next

但是错误:“ GetElementsByName”不是“ Skybound.Gecko.GeckoElementCollection”的成员

0 个答案:

没有答案