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

Hi,

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 :)

Comments

  • 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.
  • 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.
  • 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.
  • 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
  • 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.

Howdy, Stranger!

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

Categories