VB Web Broswer if this field or the input box is gone?
Code:
If WebBrowser1.Document.Url.Equals("https://login.yahoo.com/config/login_verify2?.intl=us&.src=ym") = True Then
WebBrowser1.Document.GetElementById("login").SetAttribute("value", "username.text")
WebBrowser1.Document.GetElementById("passwd").SetAttribute("value", "password.text")
Me.WebBrowser1.Document.Forms(0).InvokeMember("submit")
End If
Running this is ok but when I close the browser and run again then I will get Null error after applying this code because the username input box is already gone instead it was replace by the last username I used. ex. [email protected] replace the current login box. Is there anyway to resolve this? Clearing web info? cookies etc?