{"id":25221781,"url":"https://github.com/nafizkamal11/Web-Automation-using-JUnit-Selenium","last_synced_at":"2025-04-05T12:12:02.993Z","repository":{"id":269835356,"uuid":"908596201","full_name":"nafizkamal11/Web-Automation-using-JUnit-Selenium","owner":"nafizkamal11","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-28T01:51:46.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T12:11:58.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nafizkamal11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-26T13:11:30.000Z","updated_at":"2025-02-21T15:02:38.000Z","dependencies_parsed_at":"2025-01-31T22:29:47.847Z","dependency_job_id":"62564740-676b-4379-9bf0-ce616bbc9a8b","html_url":"https://github.com/nafizkamal11/Web-Automation-using-JUnit-Selenium","commit_stats":null,"previous_names":["zfnkml/salmanrahman-sdet-assignment-on-junit","nafizkamal11/web-automation-junit-selenium"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafizkamal11%2FWeb-Automation-using-JUnit-Selenium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafizkamal11%2FWeb-Automation-using-JUnit-Selenium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafizkamal11%2FWeb-Automation-using-JUnit-Selenium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nafizkamal11%2FWeb-Automation-using-JUnit-Selenium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nafizkamal11","download_url":"https://codeload.github.com/nafizkamal11/Web-Automation-using-JUnit-Selenium/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332611,"owners_count":20921854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-10T22:53:17.025Z","updated_at":"2025-04-05T12:12:02.688Z","avatar_url":"https://github.com/nafizkamal11.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Web Automation Project using ...\n\n![image](https://github.com/user-attachments/assets/591ca613-73b9-42e0-a764-0b5d2be1946c)\n\n\n\n# 📊 Table of Contents\n\n1. [Introduction](#a-web-automation-project-using)\n2. [🖥️ Features](#️-features)\n3. [🧪 Test Cases Overview](#-test-cases-overview)\n   - [1. `Q1_DigitalUnite`](#1-q1_digitalunite)\n   - [2. `Q2_wpEverest`](#2-q2_wpeverest)\n   - [3. `Q3_dsebd`](#3-q3_dsebd)\n4. [🔒 Prerequisites](#-prerequisites)\n5. [🚀 Project Setup](#-project-setup)\n6. [🏗️ Directory Structure](#️-directory-structure)\n7. [🔨 Configuration](#-configuration)\n   - [`build.gradle`](#buildgradle)\n   - [`MyUtils`](#myutils)\n8. [🏷️ Known Issues](#️known-issues)\n\n\nThis project contains three test classes that automate various tasks using Selenium WebDriver with Java. Each class demonstrates a unique use case for web automation, including form submission, data scraping, and file handling.\n\n---\n\n## 🖥️ Features\n\n- **Automated Form Filling and Validation**\n    - Tests the form-filling process on two different websites.\n    - Handles file uploads, checkbox clicks, and form submission validations.\n- **Web Scraping**\n    - Scrapes table data from a financial website and writes it to a text file.\n- **Reusable Utility Functions**\n    - Scroll, wait, and interact with web elements using utility methods.\n- **Headless Browser Support**\n    - Demonstrates scraping in a headless browser environment.\n\n## 🧪 Test Cases Overview\n\n### 1. `Q1_DigitalUnite`\n\nAutomates a form submission process on the [Digital Unite Practice Form](https://www.digitalunite.com/practice-webform-learners).\n\n### Key Features:\n\n- Handles cookie consent pop-ups.\n- Fills out text fields with sample data.\n- Uploads an image file and selects checkboxes.\n- Submits the form and validates the confirmation message.\n\n### Usage:\n\n```java\n@Test\nvoid digitalUnite_formFillUp_confirmationMessage()\n```\n\n### Gradle Report:\n\n![image](https://github.com/user-attachments/assets/5898edcc-c1e2-4881-a106-edee0f4fa247)\n\n\n### 2. `Q2_wpEverest`\n\nAutomates the registration process on the [WP Everest Guest Registration Form](https://demo.wpeverest.com/user-registration/guest-registration-form/).\n\n### Key Features:\n\n- Randomized email and password generation.\n- Selects dropdown values for nationality and country.\n- Handles radio buttons, checkboxes, and calendar inputs.\n- Validates success messages post-registration.\n\n### Usage:\n\n```java\n@Test\nvoid wpEverestFormFillUp_confirmationMessage()\n\n```\n\n### Gradle Report:\n\n![image](https://github.com/user-attachments/assets/46c792be-e5fa-4378-a7c1-e219a0d88697)\n\n### 3. `Q3_dsebd`\n\nScrapes table data from the [DSEBD Latest Share Price](https://dsebd.org/latest_share_price_scroll_by_value.php) page.\n\n### Key Features:\n\n- Operates in headless mode for efficient data extraction.\n- Extracts HTML table data and writes it to a text file.\n- Formats and logs the data for console output and storage.\n\n### Usage:\n\n```java\n@Test\nvoid scrapData_htmlTable_textFile()\n\n```\n\n### Gradle Report:\n\n![image](https://github.com/user-attachments/assets/ebbb4467-9e22-4f2a-8b2c-60cdb0208c49)\n\n\n## 🔒 Prerequisites\n\n1. **Java Development Kit (JDK)**\n    \n    Ensure JDK 8+ is installed and configured.\n    \n2. **Gradle**\n    \n    Install Gradle or use the wrapper script provided.\n    \n3. **WebDriver**\n    \n    Download and configure the appropriate WebDriver \n    \n4. **Dependencies**\n    \n    Add the following dependencies to your `build.gradle` file.\n    \n    - Selenium Java\n    - JUnit 5\n    - Any required utilities for file handling or browser-specific configurations.\n\n## 🚀 Project Setup\n\n1. Clone the repository:\n    \n    ```bash\n    git clone https://github.com/your-username/selenium-automation-project.git\n    cd selenium-automation-project\n    ```\n    \n2. Build the project:\n    \n    ```bash\n    ./gradlew build\n    \n    ```\n    \n3. Run the tests:\n    \n    ```bash\n    ./gradlew test\n    \n    ```\n    \n\n## 🏗️ Directory Structure\n\n```\nsrc/\n├── main/\n│   ├── java/\n│   └── resources/\n└── test/\n    ├── java/\n    │   ├── Q1_DigitalUnite.java\n    │   ├── Q2_wpEverest.java\n    │   └── Q3_dsebd.java\n    └── resources/\n        ├── scrapData.txt\n        └── myImage.jpg\n\n```\n\n## 🔨 Configuration\n\n### `build.gradle`\n\nEnsure the following dependencies are included in your `build.gradle`:\n\n```\ndependencies {\n    testImplementation platform('org.junit:junit-bom:5.10.0')\n    testImplementation 'org.junit.jupiter:junit-jupiter'\n    implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.27.0'\n}\n```\n\n### `MyUtils`\n\n- Custom Utility Class\n- Includes helper methods for tasks like scrolling, waiting, and handling repetitive actions.\n\n## 🏷️Known Issues\n\n- **File Path Configuration:**\n    \n    Ensure the file paths for the resources (e.g., `myImage.jpg`, `scrapData.txt`) match your environment.\n    \n- **Delayed Form Validation:**\n    \n    Some forms might display confirmation messages with a delay. The tests account for such cases with dynamic waits.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafizkamal11%2FWeb-Automation-using-JUnit-Selenium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnafizkamal11%2FWeb-Automation-using-JUnit-Selenium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnafizkamal11%2FWeb-Automation-using-JUnit-Selenium/lists"}