Available
UI & E2E Automation
Synced from GitHub1m ago

Comprehensive Playwright automation repository covering UI, API, and real-world scenarios from basic to advanced, with auth handling, network monitoring, data-driven testing, reusable utilities, and E2E flows.

View source Live site
git clone https://github.com/Aayush-Mishraa/playwright-automation-scenarios-ts-js.git
10Commits
7mo agoLast push
Feb 2026Created
111Files
2Stars
228.0 KBSize

Commit activity

35 weeks · 10 commits

Languages

by bytes of code
79.3%TypeScript
  • TypeScript79.3%
  • JavaScript20.7%

Commit rhythm

weekday × hour, your timezone
SunMonTueWedThuFriSat12a6a12p6p11p

Project anatomy

111 files · 13 folders
Commit log

Every change, as it happened

Straight from the default branch. Newest first — scroll to travel back in time.

2 commits

  1. feature
    Add end-to-end tests and utility functions for Playwright
    Details
    - Implemented E2E API tests for user creation, retrieval, update, and deletion using Playwright.
    - Created end-to-end tests for shopping flow, including login, product addition, and order placement.
    - Added utility functions for element interactions and visibility checks in ElementUtil class.
    - Developed tests for network request interception and response validation.
    - Included visual testing capabilities with screenshot comparisons.
    - Enhanced locator strategies using Playwright's getBy methods for better readability.
    - Added tests for UI components like radio buttons and checkboxes.
    - Implemented API testing for user authentication and order management.
    Aayush-Mishraa7efc02e

1 commit

  1. feature
    feat: add ExcelJS dependency and implement Excel file manipulation in tests
    Details
    - Added `exceljs` dependency to package.json for Excel file handling.
    - Increased Playwright test timeout from 40s to 60s for better stability.
    - Created `DownloadAndUploadSenario.spec.js` for testing Excel file download, modification, and upload.
    - Implemented network request interception in `NetworkTest2.spec.js` for security testing.
    - Added image request blocking and logging in `NetworkTest3.spec.js` for performance optimization.
    - Introduced screenshot and visual comparison tests in `ScreenshotAndVisualComperation.spec.js`.
    - Added a new screenshot for visual comparison.
    Aayush-Mishraa93fc9aa

1 commit

4 commits

2 commits

That's the first commit — where it all started.Full history on GitHub
README.md

Documentation

Playwright Automation

A hands-on Playwright workspace that grows from basic UI checks to advanced UI + API scenarios. I use it as a learning sandbox and a quick place to validate ideas before moving them into real projects.

Quick start

  1. Install dependencies
npm install
npx playwright install
  1. Run a few tests
# run everything under tests
npx playwright test

# run a folder
npx playwright test tests/testAllSenarios
npx playwright test tests/testlogics

# run api tests only
npx playwright test tests/testAllSenarios/apis
  1. Open the report
# after a run
npx playwright show-report

Configs

  • playwright.config.js
    • Headed Chromium, screenshots only on failure, traces retained on failure.
  • playwright.config2.ts
    • Multi-browser projects with standard Playwright defaults.

You can switch configs like this:

npx playwright test --config playwright.config2.ts

Folder map

  • tests/testAllSenarios
    • Main learning track: basic to advanced UI + API topics.
  • tests/testAllSenarios/apis
    • API-only suites.
  • tests/testlogics
    • Focused automation patterns and demo flows.
  • tests/utils
    • Reusable helpers.
  • auth
    • Storage state and session data.
  • playwright-report, test-results
    • Playwright HTML report and raw artifacts.

Scenario index (basic to advanced)

tests/testAllSenarios

  • app.spec.ts - basic app flow and smoke checks.
  • assertions.spec.ts - expect and assertion patterns.
  • backandforward.spec.ts - browser navigation history.
  • browsercontext.spec.ts - multiple contexts and isolation.
  • calendar.spec.ts - date picker interactions.
  • customFixture.spec.ts - custom fixture setup and usage.
  • datadriveFaker.spec.ts - faker-driven input data.
  • datadrivenExcel.spec.ts - data driven tests with Excel.
  • dataprovider.spec.ts - data provider basics.
  • dataproviderCSV.spec.ts - CSV based data provider.
  • dataproviderjson.spec.ts - JSON based data provider.
  • describe.spec.ts - describe blocks and grouping.
  • google.core.spec.ts - core search flow with Google.
  • google.spec.ts - UI search checks on Google.
  • hooks.spec.ts - before/after hooks.
  • hooksinsidedecribe.spec.ts - hooks inside describe blocks.
  • InBuiltFixture.spec.ts - built-in Playwright fixtures.
  • launchurl.spec.ts - launch and basic navigation.
  • loginpage.spec.ts - login page flow.
  • mytest.spec.ts - mixed sample tests.
  • myutil.spec.ts - helper usage in tests.
  • productinfo.spec.ts - product page validations.
  • regfix.spec.ts - regex locator or fix-up examples.
  • register.spec.ts - registration flow.
  • retry.spec.ts - retry behavior.
  • search.spec.ts - search flow validations.
  • serialrun.spec.ts - serial execution patterns.
  • sessiontest.spec.ts - session handling.
  • storage-session.spec.ts - storage state reuse.
  • webtablepagination.spec.ts - table pagination logic.

tests/testAllSenarios/apis

  • basicauth.spec.ts - basic auth coverage.
  • gorest.spec.ts - GoRest API basics.
  • gorest_crud.spec.ts - GoRest CRUD flow.
  • gorest_e2e.spec.ts - GoRest end-to-end.
  • network_monitoring.spec.ts - network monitoring in API tests.
  • product_jsonpath.spec.ts - JSONPath validation.
  • schema_validation.spec.ts - schema validation checks.
  • spotify_oauth2.spec.ts - OAuth2 token flow.

tests/testlogics

  • APITest.spec.ts - API test fundamentals.
  • BrowserContext.spec.ts - context and isolation demos.
  • CalenderUISenario.spec.js - calendar UI scenario.
  • ChildParentWindow.spec.js - window and tab handling.
  • ClientAPP.spec.js - client app flow checks.
  • DownloadAndUploadSenario.spec.js - upload and download flows.
  • E2EAPITest.spec.ts - API end-to-end test.
  • EndToEndTest_UsingGetBy.spec.js - E2E flow using getBy locators.
  • EndToEnd_WebAutomationPractice.spec.js - E2E practice flow.
  • gorest_e2e.spec.ts - GoRest end-to-end API.
  • LocateElement_Using_GetBy.spec.js - locator strategies with getBy.
  • NetworkTest.spec.js - network intercept or listen basics.
  • NetworkTest2.spec.js - network scenario two.
  • NetworkTest3.spec.js - network scenario three.
  • product_jsonpath.spec.ts - JSONPath validations.
  • RadioButton_CheckBoxesUI.spec.js - radio and checkbox controls.
  • ScreenshotAndVisualComperation.spec.js - visual comparison.
  • UIBasictest.spec.js - basic UI actions.
  • WebAPIOopsPart1.spec.js - API design with OOP style.
  • WebAPIPart1.spec.js - API basics and patterns.

Helpers

  • tests/utils/APIutils.js - API helper functions.
  • tests/utils/ElementUtil.ts - element and locator helpers.

Notes

  • package.json includes a sample script that runs one spec in headed mode. Use the CLI examples above for full control.
  • If you are reusing session state, keep auth/session.json updated.
More in UI & E2E Automation

Related projects

Like what you see?

Let's build something reliable together.

Get in touch