Skip to content

This repository contains the code for automating web forms and scraping stock market data using Selenium WebDriver and JUnit. It includes automation for two web forms and data scraping from a stock exchange website.

Notifications You must be signed in to change notification settings

ShababAhmedd/AutomatedWebFormsAndScraping

Repository files navigation

Web Automation and Scraping Project

Description

This project automates two web forms and scrapes a table from a website using Selenium WebDriver and JUnit. The main tasks are:

Tech Stack

  • Java 17
  • Selenium WebDriver
  • JUnit (for testing)
  • Gradle (for project management)
  • ChromeDriver (for browser automation)

Prerequisites

Before running the tests, ensure the following:

  • Java 17 or higher
  • ChromeDriver (or another WebDriver if you're using a different browser)

The project dependencies for Selenium WebDriver and JUnit 5 are already configured in the build.gradle file:

dependencies {
    testImplementation platform('org.junit:junit-bom:5.10.0')
    testImplementation 'org.junit.jupiter:junit-jupiter'
    implementation 'org.seleniumhq.selenium:selenium-java:4.31.0'
}

How to run

  1. Clone the repo:

    git clone https://github.com/ShababAhmedd/AutomatedWebFormsAndScraping
  2. Set Up ChromeDriver Make sure ChromeDriver is properly set up and available in your system's PATH.

    • Download ChromeDriver from: ChromeDriver Download
    • Ensure that the downloaded chromedriver binary is added to your system’s PATH.
    • Alternatively, specify the path to ChromeDriver in your test code if it’s not in the PATH.

    Example (if you're setting it manually in your code):

    System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
  3. Run all tests with Gradle:

    ./gradlew test

    This will execute all the tests in the project.

    To run a specific test class (e.g., DigitalUniteForm), use:

    ./gradlew test --tests "PracticeWebform"

    Replace "PracticeWebform" with the name of any test class you want to run.

  4. Check test results in the build/reports/tests/test folder.

    • This folder contains detailed HTML test report for the test class you run.
    • You can open the index.html file to view test results, or check the console logs for additional details.

Video Demonstrations

Watch Task 1: Digital Unite Webform Automation.

WebForms.mp4

Watch Task 2: WP Everest Guest Registration Form Automation

userRegistration.mp4

Watch Task 3: DSEBD Data Scraping

TableDataScrap_c.mp4

Test Report

  • Task 1: Digital Unite Webform Automation
    Task 1 Report

  • Task 2: WP Everest Guest Registration Form Automation
    Task 2 Report

  • Task 3: DSEBD Data Scraping
    Task 3 Report

Project Structure

.
├── src
│   ├── main
│   │   └── java
|   |   └── resources
│   └── test
|        ├── java
|        │   ├── PracticeWebform.java
|        │   ├── TableDataScrap.java
|        │   └── UserRegistration.java
|        └── resources
├── DSE.txt
├── README.md

About

This repository contains the code for automating web forms and scraping stock market data using Selenium WebDriver and JUnit. It includes automation for two web forms and data scraping from a stock exchange website.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages