0
我有一個關於重定向url的問題。我正在自動填充。填寫表格後,我提交表格並點擊按鈕。之後,它會重新顯示一個新頁面。我需要這個重定向網址。以編程方式填寫表單後的重定向url
作爲例子
webBrowser1.Navigate("myurl.com")
For I As Integer = 0 To 500
If webBrowser1.ReadyState = WebBrowserReadyState.Complete Then Exit For
Threading.Thread.Sleep(1)
Application.DoEvents()
Next
Dim elementLogin = webBrowser1.Document.GetElementById("login_identifier")
If Not IsNothing(elementLogin) Then
webBrowser1.Document.GetElementById("login_identifier").SetAttribute("Value", "myemail")
End If
Dim elementPassword = webBrowser1.Document.GetElementById("login_password")
If Not IsNothing(elementLogin) Then
webBrowser1.Document.GetElementById("login_password").SetAttribute("Value", "mypassword")
End If
webBrowser1.Document.GetElementById("login_btn").Enabled = True
webBrowser1.Document.GetElementById("login_btn").InvokeMember("click")
我需要點擊該按鈕後重定向的URL。當它點擊登錄按鈕後重定向到新頁面。如果可能,請幫我解決此問題 謝謝
感謝您的回覆。其實ele.GetAttribute(「href」)是空的。 –
它是空的還是「#」?這將表明有JavaScript或其他參與。 –
它只是空的「」 –