我正在尝试为 Adnooka 获取余额检查器,但我什至无法通过登录。这是HTML:
</div>
<div class="control-group row-fluid">
<label class="row-fluid " for="inputPassword">Password <div class="pull-right"><a class="muted"><small><a href='http://adnooka.com/recover'>Forgot your password ?</a></small></a></div></label>
<div class="controls row-fluid input-append">
<input type="password" id="inputPassword" placeholder="Password" name="password" class="row-fluid" value=""> <span class="add-on"><i class="icon-lock"></i></span>
</div>
</div>
<div class="control-group row-fluid fluid">
<div class="controls span6">
</div>
<div class="controls span5 offset1" style=''>
<button type='submit' class="btn btn-default" style='float:right'>Login<i class="gicon-chevron-right"></i></a>
</div>
</div>
但是按钮没有ID或名称,我该如何点击它?如何返回余额的值?
这是我到目前为止所得到的:
WebBrowser1.Document.GetElementById("email").SetAttribute("value", textbox1.Text)
WebBrowser1.Document.GetElementById("password").SetAttribute("value", pass.Text)
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements
If webpageelement.GetAttribute("type") = "submit" Then
webpageelement.InvokeMember("click")
End If
Next
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://adnooka.com/login")
End Sub