How can I login my online accounts automatically using windows form? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How can I login my online accounts automatically using windows form?

trickx0729trickx0729 Posts: 6Member

I need help in developing a certain software that can log-in the user's online account even in just one site only (for the time being).

Using a windows form, i have been able to collect a user account information such as the username and password and its respective log-in page URL.

As of now, i can only select an account and press a button to open a browser that will automatically bring the user to the log-in page of his selected account.

My "BIG PROBLEM" is how can i automatically log-in a user inside his account (e.g. yahoo mail) without pressing the log-in page's log-in/sign-in button.

I am using the C# language and have no idea how to make it work. Please, help me figure out this problem.

Any ideas are welcome.
Thanks in advance :)


  • DataDinkDataDink Posts: 135Member
    You have to actually log in. Yahoo or whatever needs you to actually use their log in process so they can either start a session for you or save a cookie or however that particular site handles their authentication. You can't just make up your own session id.

    You might try using the winform web client control.
  • trickx0729trickx0729 Posts: 6Member
    uhmm, is there a possibility where i can put the username and password in its respective field in the log-in page?? well, that would help a lot if i can do it.
  • DataDinkDataDink Posts: 135Member
    Actually yes - The "WebBrowser" winform control will give you access to the full DOM of any page you have loaded.

    webBrowser1.Document (or whatever you name it)

    so document.All would give you all of the objects on the page - but you can also navigate down the hierarchy if you start at Document.Body.Children... and so on.

    Find the textbox for the user name, the one for the password, and then the submit button.

    Set the inner text for the login and password and then do a click on the submit button (or a submit on the containing form).

    The webbrowser doesn't even have to be showing on a visible form. So you can just use it as a class for it's functionality.
  • trickx0729trickx0729 Posts: 6Member
    Thanks for the information, this would help a lot. But may I ask one last favor? :D

    Is there any good tutorial (web ref.) about this kind of topic? "WebBrowser" winform control? The truth is.. I have never used this kind of control yet in C# so i really don't know how to use its functions, properties, etc.

    I would gladly read all of the reference's content just to learn this control. Thanks again DataDink and sorry for being demanding, I'm just a student by the way :D
  • DataDinkDataDink Posts: 135Member
    Just to follow up - I looked and didn't really find a good tutorial for this.

    Stuff to search for is "C# WebBrowser Document Object Model"
Sign In or Register to comment.