Skip to content

sandipchopkar95/Ready-To-Use-Framework-Playwright-Typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📘 Ready-To-Use Framework: Playwright + TypeScript

A scalable, modular, and easy-to-extend UI automation framework built with Playwright and TypeScript. Supports multiple user roles, test data management, and reusable page objects for real-world E2E testing.


📂 Project Structure

├── src/
│   ├── config/               # Test configuration (env, base URLs)
│   ├── fixtures/             # Login/Auth/session fixtures
│   ├── pages/                # Page Object Model classes
│   ├── testdata/             # JSON test data
│   ├── tests/                # Test specs
│   └── utils/                # Helpers (e.g., logging, session cleanup)
├── .gitignore
├── package.json
├── playwright.config.ts      # Playwright project & test config
├── tsconfig.json             # TypeScript config

🚀 Features

  • ✅ Playwright + TypeScript setup
  • ✅ Page Object Model (POM) structure
  • ✅ Multi-user login fixture (authFixture.ts)
  • ✅ Multi-user login session management
  • ✅ Test data driven from JSON
  • ✅ Session handling and cleanup
  • ✅ Headed & UI test runner support (npx playwright test --ui)
  • ✅ Modular utilities (loggers.ts, clearAllSessions.ts)

🛠 Installation

git clone https://github.com/sandipchopkar95/Ready-To-Use-Framework-Playwright-Typescript.git
cd Ready-To-Use-Framework-Playwright-Typescript
npm install

📦 Run Tests

  • Run all tests:

    npx playwright test
  • Open UI mode (headed):

    npx playwright test --ui --headed

🧪 Sample Test File

// src/tests/demotest.spec.ts

   test('Admin login', async ({ adminPage }) => {
        const dashboard = new DashboardPage(adminPage);
        await dashboard.navigateToUrl(testConfig.endpoints.dashboardUrl);
        const adminUserText = await dashboard.getLoginUserName();
        expect(adminUserText).toEqual('manda user');
    });

👤 Author

Sandip Chopkar


About

A scalable, modular, and easy-to-extend UI automation framework built with Playwright and TypeScript. Supports multiple user roles, user session management ,test data management, and reusable page objects for real-world E2E testing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors