Web サイトへのログインを行っていますが、既に完成したドキュメントを使用しているため、ログインが成功したかどうかを確認するのに問題があります。ログアウトボタンが存在するかどうかを確認すると、ページの読み込みが完了していません。これが私のコードです:
Imports System.Net
Imports System.Text
Imports System.IO
Public Class Form1
Private Sub FutureButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FutureButton2.Click
If TextBox1.Text = ("") Or
TextBox2.Text = ("") Or
TextBox3.Text = ("") Or
TextBox4.Text = ("") Or
TextBox5.Text = ("") Or
TextBox6.Text = ("") Then
MsgBox("some information is Missing please Fill all The Boxes")
Else
WebBrowser1.Navigate("http://combatarms.nexon.net/Support/UserAbuse.aspx")
Form2.Show()
End If
End Sub
Private Sub WebBrowser2_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim Username, Password As String
Username = TextBox1.Text
Password = TextBox2.Text
Form2.FutureProgressBar1.Progress = 10
On Error Resume Next
WebBrowser1.Document.All("userID").SetAttribute("value", TextBox1.Text)
Form2.FutureProgressBar1.Progress = 20
WebBrowser1.Document.All("password").SetAttribute("value", TextBox2.Text)
Form2.FutureProgressBar1.Progress = 30
WebBrowser1.Document.All("gnt_login_submit").InvokeMember("click")
Form2.FutureProgressBar1.Progress = 40
If WebBrowser1.StatusText = ("Done") Then
If (WebBrowser1.Document.All("btnLogin") Is Nothing) Then
msgbox("Works")
else
MsgBox("wrong")
I have worked on it for days. The login is working but I can't get it to verify it.
Thanks for the help!