Hi guys
I am having problem to fills the text on each textbox in the webpage. I did get one textbox to fill only, not for others. When I attempt to fill the texts in two textbox at the same time, I get the error.
Error:
NullReference was unhandlded
Object reference not set to an instance of an object.
Code:Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click WebBrowser1.Document.Forms(0).All("Username").SetAttribute("value", "fake") WebBrowser1.Document.Forms(0).All("Password").SetAttribute("value", "password") WebBrowser1.Document.Forms(0).All("Confirm Password").SetAttribute("value", "password") WebBrowser1.Document.Forms(0).All("Email Address").SetAttribute("value", "[email protected]") WebBrowser1.Document.Forms(0).All("Confirm Email Address").SetAttribute("value", "[email protected]") WebBrowser1.Document.Forms(0).InvokeMember("submit") End Sub
I don't understand it as it should work in the first place so please can you help me to get this fix??
Thanks,
Mark




Reply With Quote