C#

Moderators: None (Apply to moderate this forum)
Number of threads: 2720
Number of posts: 5746

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
How can I login my online accounts automatically using windows form? Posted by trickx0729 on 25 Jul 2009 at 9:57 AM
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 :)
Report
Re: Posted by DataDink on 25 Jul 2009 at 10:16 AM
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.
Report
Re: Posted by trickx0729 on 26 Jul 2009 at 1:17 AM
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.
Report
Re: Posted by DataDink on 26 Jul 2009 at 2:25 PM
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.
Report
Re: Posted by trickx0729 on 26 Jul 2009 at 9:03 PM
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
Report
Re: Posted by DataDink on 27 Jul 2009 at 4:46 PM
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"



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.