# Creating a Automation bot with python

# Automation
 Automation has become very important and a is really a powerful tool in recent days. There are mainly two programming languages used for automation, **python** and **Java Script**. Each language has its own famous libraries for automating web tasks.

## Libraries 
  The major library used for automating is [Selenium](https://www.selenium.dev/). It is very powerful and is used by many companies for checking of web applications. 
   The famous libraries in java script is [Puppeteer](https://developers.google.com/web/tools/puppeteer)

### Requirements
  We need to have the following for web automation in python,

  +  [Chrome Web Driver](https://chromedriver.chromium.org/downloads)
  +  [Selenium library](https://pypi.org/project/selenium/)

The libraries can be installed with the pip packet manager. We can also use a web scraping library like [Beautiful Soup](https://pypi.org/project/beautifulsoup4/) with automation to perform variety of tasks (explained in the project section).

## Concept of Web Automation
  Web Development depends on creating many **tags** such as `input` ,`h1`,`code`. Similarly Web automation works by finding where this tags are present on our webpage by looking at the source code of the web page. Then perform actions on the tag or get information from the tag. Web automation also provides Driver wait functions for hidden links. 

# Project
  Creating a Web Bot which is used to answer multiple choice assignment questions by getting answers from another website by scraping content from the website. This project can be divided into two parts scraping for answers and answering multiple choice questions with the answers.

## Scraping  for answers

  The library `beautifulsoup4` is used for to get the answers from other website and store it in a list.

## Answering the questions
  
  First, login is performed by sending the username and password to the **input fields** and pressing the log in button automatically.
  Then, after opening chrome, we must need to proceed to page where the multiple choice questions are present. This is done by finding buttons to next page and clicking on them. Then the options to a question are collected and are compared with the answers to the question scraped from the website in step 1. If the option is found right, the **radio button** is clicked. Then answering every question, finally the submit button is clicked.

## Project Links:
  The complete project and work flow of the project can be found on [Github](https://github.com/harisankar01/Answer-automation0). If you want a tutorial on the whole project please comment below.
