Login Program
-
Hi Ever since I read an article about test animation I have been trying to build a program to run and log me in to some of the many sites I check daily. However I have run into a few problems i can not get around. The site I read the article at is (http://msdn.microsoft.com/msdnmag/issues/05/10/TestRun/) 1. when I have ie.DocumentComplete.WaitOne(); in the code i get the error The event 'SHDocVw.DWebBrowserEvents2_Event.DocumentComplete' can only appear on the left hand side of += or -= I don't understand why I am getting this error because it worked in the example 2. When debugging after i get to HTMLDocument doc = (HTMLDocument)ie.Document; in the cmd window i get this error Unable to cast COM object of type 'System._ComObject' to interface type 'mshtml.HTMLDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F55F-98B5-11CF-BB82-00AA00BDCE0B}' failed due to the following error: No such interface supported >. internetExplorer ie = null; Process p = Process.Start("iexplore.exe", "site using php login"); InternetExplorer ie = // code to find correct IE HTMLDocument doc = (HTMLDocument)ie.Document; Console.WriteLine("Setting Text Box 1 to 'UserName'"); HTMLInputElement textBox = (HTMLInputElement)theDoc.getElementsByName("username"); textBox.value = "Bla"; Thanks for all the help