Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Login to gmail account through win form c# application
M CH
Aug 28 2017 12:09 PM
271
Reply
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
username.SetAttribute("value", "
[email protected]
");
pass.SetAttribute("value", "mypassword");
submit.InvokeMember("click");
}
Please help me. I am worried about it.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Data extract using delimiter
Plugin code development