Browser Bot Development

Introduction

I was requested to build a web browser bot that should auto-fill forms on specified websites with random user profile data. An example of a form is shown below:

An example of a simple web form A simple web form example

Problem

Many types of forms exist, and their layouts may not be the same as the above example. Fortunately, the requester only wanted the bot to operate on specific websites.

These specific websites have similar form structures, and so it was trivial to web scrape and identify specific input fields such as for first name, last name, and email.

Solution

I decided to develop the web browser bot in Python because I have used it before to do other web scraping projects. In order to interact with the web browsers such as Firefox and Chrome, I needed to use the Selenium WebDriver API. This API was used to identify form input fields and auto-filling those fields with randomly generated data. It was also used to submit the forms as well.

User profile data were randomly generated through Python packages such as names, a random names generator.

Conclusion

I gave the Python script and simple usage instructions files to the requester and they were satisfied with the outcome of being able to generate random user profile data and auto-filling forms on their specified websites.