Skip to content

keshavjha06/PlaywrightAutomation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎭 Playwright Test Automation Framework

A comprehensive, robust automation testing suite developed using Playwright with JavaScript. This project serves as a showcase of testing strategies, demonstrating UI interactions, API automation, Page Object Model (POM) pattern, and Data-Driven Testing (DDT) using diverse formats (JSON, CSV, Excel).

🚀 Key Features & Test Scenarios

This repository demonstrates the automation of a wide array of web elements, testing configurations, and patterns:

1. UI Elements & Interactions

2. Page Object Model (POM)

3. API Testing

4. Data-Driven Testing (DDT)

5. Advanced Playwright Controls

📁 Directory Structure

PlaywrightAutomation/
│
├── pages/                  # Page Object Model Class Definitions
│   ├── LoginPage.js        # Locators and helper methods for Login Page
│   ├── HomePage.js         # Locators and helper methods for Home Page
│   └── CartPage.js         # Locators and helper methods for Cart Page
│
├── tests/                  # Playwright Specification/Test Files
│   ├── apitests.spec.js    # API automation test cases
│   ├── pomtest.spec.js     # POM-based UI workflow test case
│   ├── paramtest*.spec.js  # Data-Driven Parameterization spec files
│   ├── uploadfiles/        # Directory containing test upload files
│   └── commands.txt        # Playwright and Cucumber command cheat-sheet
│
├── testdata/               # Test Datasets (JSON, CSV, Excel files)
│   ├── data.json           
│   ├── data.csv            
│   └── data.xlsx           
│
├── playwright.config.js    # Global Playwright configuration file
├── package.json            # Node.js project manifests and dev dependencies
└── .env                    # Environment variables (API keys, etc.)

⚙️ Prerequisites & Setup

  1. Node.js: Ensure Node.js (version 18 or above recommended) is installed on your machine.
  2. Clone the Repository:
    git clone <repository-url>
    cd PlaywrightAutomation
  3. Install Project Dependencies:
    npm install
  4. Install Playwright Browsers:
    npx playwright install

📊 Reporting

1. Allure Report Integration

Allure Playwright reporter is pre-configured in the project dependencies.

  • Generate Allure Report:
    npx allure generate allure-results --clean
  • Open Allure Report:
    npx allure open allure-report

About

Playwright Test Automation Framework with JavaScript

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors