Automatically fill in the login form for facebook.com
How to automatically fill in the Facebook login form: username and password using c# windows form application.
I want to make the work automatic with a single button and open my Facebook page into my text field or something else. Less work, less time.
Okay, you need to learn something called web browser automation. Their is a browser automation library/tool called as Selenium. Use it to achieve your goal. I did exactly the same thing around 6 years ago.
Code below mentioned steps in your code with selenium in order and you shall achieve what you deserve. You can get selenium and more resources from here.
- Initialize selenium web driver for whatever browser you are using. I will recommend Firefox though.
- Open the login page of Facebook.
- Get user name textbox through its XPath and send key strokes of your user name.
- Do the above step for password text box also.
- Add code to simulate click on login button.