Hi,
I was not able to access IE elements from SHDOCvw.Internetexplorer ie object. Below is my code.
//Manipulating HTML element HTMLDocument document = (HTMLDocument)ie.Document; IHTMLDocument2 d = (IHTMLDocument2)ie.Document; Console.WriteLine("Setting text box to google search text box"); IHTMLElement element = document.getElementById("lst-ib");
Any suggestions ? The error i get is
'((mshtml.HTMLDocumentClass)(document)).activeElement' threw an exception of type 'System.InvalidCastException'