Auto filling HTML Page using C#
Hi,
I am developing an IE plugin which will auomatically provide
username and password to web pages on click of a button. I was trying
to develop a dummy button to test the approach and am trying to use
HTMLInputElementClass. The code compiles well but gives a run time
exception in the browser. the code goes like :
privatevoid bttnEnterUserName_Click(object sender,EventArgs e)
{
HTMLDocumentClass doc =newHTMLDocumentClass();
doc = (HTMLDocumentClass)this.Explorer.Document;
HTMLInputElementClass ele =newHTMLInputElementClass();
if (doc.url.ToString() =="https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl<mpl=cm_blanco<mplcache=2")
{
foreach (HTMLInputElementClass elementin doc.getElementsByTagName("input"))
{
ele = (HTMLInputElementClass) element.getAttribute("Email", 0);
element.value =
"prayag.narula";}
}
}
what am i doing wrong. Wat other aproach can i use?

