Hi everyone, I want to make a win form application in it I have webBrowser1 control. I want to login to gmail account through my win form c# app. When I goes through this code I hope my code is well but who to getElementById of username and password from gmail.com
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
HtmlDocument hd = webBrowser1.Document;
HtmlElement username = hd.GetElementById("userNameTextBoxId");// how to find id from //gmail.com
HtmlElement pass = hd.GetElementById("passwordTextBoxId"); // I goes through inspect
HtmlElement submit = hd.GetElementById("BtnId"); // elements but m unable to find id's
pass.SetAttribute("value", "mypassword");
submit.InvokeMember("click");
}
Please help me. I am worried about it.