Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

IE Web UI Automation using c#

$
0
0

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'


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>