https://github.com/rajatt95/testautomationframework_yt_rajat_web_playwright_js
This repository contains a Test Automation Framework built using Playwright and Javascript for automated testing of web applications.
https://github.com/rajatt95/testautomationframework_yt_rajat_web_playwright_js
chromium custom-utilities github-actions javascript nodejs page-object-model parallel-cross-browser-testing playwright playwright-html-report retries screenshot test-automation traces vscode
Last synced: 3 months ago
JSON representation
This repository contains a Test Automation Framework built using Playwright and Javascript for automated testing of web applications.
- Host: GitHub
- URL: https://github.com/rajatt95/testautomationframework_yt_rajat_web_playwright_js
- Owner: rajatt95
- Created: 2024-01-26T20:00:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-27T10:16:04.000Z (over 1 year ago)
- Last Synced: 2025-03-23T20:37:17.267Z (3 months ago)
- Topics: chromium, custom-utilities, github-actions, javascript, nodejs, page-object-model, parallel-cross-browser-testing, playwright, playwright-html-report, retries, screenshot, test-automation, traces, vscode
- Language: JavaScript
- Homepage: https://www.youtube.com/@rajatt95
- Size: 58.6 KB
- Stars: 9
- Watchers: 5
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
# 💻 Test Automation Framework | WEB[](https://playwright.dev/)
[](https://js.org/index.html)[](https://code.visualstudio.com/)
[](https://www.npmjs.com/package/playwright-html-reporter)
[](https://github.com/features/actions)## 📑 Table of Contents
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Running Tests](#running-tests)
- [Project Structure](#project-structure)
- [Configuration](#configuration)
- [Continuous Integration](#continuous-integration)
- [Reporting](#reporting)
- [Other Projects](#other-projects)
- [Technical Documents](#technical-documents)
- [Contacts](#contacts)## 📖 Introduction
This repository contains a Test Automation Framework built using Playwright and Javascript for automated testing of web applications.## 🛠️ Prerequisites
- [](https://nodejs.org/) (v18.16.1 or higher recommended)
- [](https://www.npmjs.com/) (v9.5.1 or higher recommended)## ▶️ Getting Started
1. Clone the repository:
```bash
git clone https://github.com/rajatt95/TestAutomationFramework_YT_Rajat_Web_Playwright_JS.git
```2. Navigate to the project directory:
```bash
cd TestAutomationFramework_YT_Rajat_Web_Playwright_JS
```3. Install dependencies:
```bash
npm install
```## 🚀 Running Tests
- Playwright UI mode:
```bash
npm run tests:ui-mode
```
- Execution in different browsers:- [](https://www.google.com/chrome/)
[](https://www.microsoft.com/edge/)[](https://www.mozilla.org/firefox/)
[](https://webkit.org/)
[](https://www.chromium.org/Home)```bash
npm run tests:CHROME
```
```bash
npm run tests:EDGE
```
```bash
npm run tests:FIREFOX
```
```bash
npm run tests:WEBKIT
```
```bash
npm run tests:CHROMIUM
```- Execution in Headless mode:
```bash
npm run tests:CHROME:HEADLESS
```## 📁 Project Structure
The tests follow a modular and maintainable structure:
```
|-- .github
| |-- workflows
| |-- 01_ui_tests_chrome.yml
| |-- 02_ui_tests_select_one.yml.yml
| |-- 03_ui_tests_ALL.yml
|-- pages
| |-- BasePage.js
| |-- CartPage.js
| |-- Components.js
| |-- LoginPage.js
| |-- ProductsPage.js
|-- test-data
| |-- login_credentials.json
|-- tests-saucedemo
| |-- components.spec.js
| |-- login.spec.js
|-- utils
| |-- VerificationUtils.js
| |-- WaitUtils.js
|-- .gitignore
|-- package.json
|-- playwright.config.js
```- `pages`: Contains the Page Object Model (POM) classes representing web pages and their elements.
- `playwright-report`: Contains the HTML report for tests (Logs, Screenshots, Traces and Videos are attached).
- `test-data`: Contains external files (example: login credentials data) that can be used to mock data during tests.
- `tests-saucedemo`: Contains the actual test files. You can organize your tests into subdirectories as needed.
- `utils`: Contains the Utilities that provides methods for asserting different conditions on web elements, waits.## ⚙️ Configuration
- Modify `playwright.config.js` for playwright configuration settings such as
- `baseURL`
- `testDir`
- `reporter`
- `fullyParallel`
- `video`
- `screenshot`
- `trace`## 🔄 Continuous Integration
This project is configured for CI using Github Actions. Check the configurations in `.github/workflows/*.yml`.
- `01_ui_tests_chrome.yml`: This workflow executes tests in Chrome browser.
- `02_ui_tests_select_one.yml`: This workflow will first ask User to select the browser for tests execution.
- `03_ui_tests_ALL.yml`: This workflow executes the tests in all browsers
[](https://www.google.com/chrome/)
[](https://www.microsoft.com/edge/)[](https://www.mozilla.org/firefox/)
[](https://webkit.org/)
[](https://www.chromium.org/Home)## 📊 Reporting
Playwright HTML report (Logs, Screenshots, Traces and Videos are attached) is stored in the `playwright-report` directory.
## 🔭 Other Projects
- [](https://github.com/stars/rajatt95/lists/programming-language-java) -
[](https://github.com/stars/rajatt95/lists/selenium-automation-frameworks)
[](https://github.com/stars/rajatt95/lists/appium-automation-frameworks)
[](https://github.com/stars/rajatt95/lists/restassured-automation-framework)- [](https://github.com/stars/rajatt95/lists/programming-language-javascript) -
[](https://github.com/stars/rajatt95/lists/cypress-automation-frameworks)
[](https://github.com/stars/rajatt95/lists/playwright-automation-frameworks)- [](https://github.com/stars/rajatt95/lists/programming-language-python) -
[](https://github.com/stars/rajatt95/lists/requests-automation-framework)## 📄 Technical Documents
- [](https://drive.google.com/drive/folders/1tne9pZjgWvfrS0l9tVHs6k1jnQHpTLoA?usp=sharing)
- [](https://github.com/rajatt95/Documents)## 📧 Contacts
- [](mailto:[email protected])
- [](https://github.com/rajatt95)
- [](https://rajatt95.github.io/)
- [](https://www.linkedin.com/in/rajatt95)
- [](https://topmate.io/rajatt95)
- [](https://t.me/rajatt95)
- [](https://www.instagram.com/rajattvermaa95/)
- [](https://www.youtube.com/@rajatt95)
- [](https://chat.whatsapp.com/LP20xMGvxnEL88GoB58bo1)
- [](https://whatsapp.com/channel/0029Va9XXMhJ93waOU5Xer3r)Feel free to reach out if you have any questions, or suggestions, or just want to chat!
Thanks for visiting my GitHub profile! 😊
![]()