Automatically fill in the login form for

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.

1 answer

  • answered 2018-07-12 06:35 Rubal Walia

    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.

    1. Initialize selenium web driver for whatever browser you are using. I will recommend Firefox though.
    2. Open the login page of Facebook.
    3. Get user name textbox through its XPath and send key strokes of your user name.
    4. Do the above step for password text box also.
    5. Add code to simulate click on login button.