自动填充用户名密码网络表单“GeckoWebBrowser”

时间:2015-05-10 23:35:00

标签: .net vb.net getelementbyid

我正在开发程序,我正在使用Skybound Gecko浏览器! 我想在打开页面时自动输入用户名和密码!

我正在使用此代码执行此操作:

Private Sub login_Click(sender As Object, e As EventArgs) Handles login.Click
    GeckoWebBrowser1.Document.GetElementById("codeTerminal").SetAttribute("value", "xxxxxx")
    GeckoWebBrowser1.Document.GetElementById("userName").SetAttribute("value", "xxxxxx")
    GeckoWebBrowser1.Document.GetElementById("pass").SetAttribute("value", "xxxxxx")
End Sub

我在谷歌和Facebook上测试它的工作! 但不使用我想要的网站:(

这是网站:http://www.youphone.co.il/loadingSystem.aspx

当我使用上面的代码时,我遇到了这个错误:

Noor Phone.exe中出现未处理的“System.NullReferenceException”类型异常

附加信息:未将对象引用设置为对象的实例。

这是网页文字信息:

1 - “<”input name =“codeTerminal”type =“text”id =“codeTerminal”style =“float:left; display:inline; background-image:url('imges / login_box_white.png') ;宽度:243px;高度:44px;背景重复:不重复;边界:无;行高:44px; “>” 中

2 - “<”input name =“userName”type =“text”id =“userName”style =“float:left; display:inline; background-image:url('imges / login_box_white.png') ;宽度:243px;高度:44px;背景重复:不重复;边界:无;行高:44px;“>

3 - “<”input name =“pass”type =“password”id =“pass”style =“float:left; display:inline; background-image:url('imges / login_box_white.png') ;宽度:243px;高度:44px;背景重复:不重复;边界:无;行高:44px;“>

我怎么能解决这个问题我想要这么糟糕 任何帮助请... ..

0 个答案:

没有答案
相关问题