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.
├── 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
- ✅ 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)
git clone https://github.com/sandipchopkar95/Ready-To-Use-Framework-Playwright-Typescript.git
cd Ready-To-Use-Framework-Playwright-Typescript
npm install-
Run all tests:
npx playwright test -
Open UI mode (headed):
npx playwright test --ui --headed
// 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');
});Sandip Chopkar