26 lines
812 B
Markdown
Raw Permalink Normal View History

---
name: Playwright - API Mocking
description: "This sample demonstrates how to mock API calls in Playwright tests"
page_type: sample
languages:
- typescript
- javascript
products:
2023-11-14 14:17:16 +01:00
- playwright
urlFragment: api-mocking
---
# API Mocking
This sample demonstrates how to
- mock API calls in Playwright tests
- intercept the request and modifying it
- mock using HAR files
For more information about the sample see:
- [Playwright API Mocking demo](https://demo.playwright.dev/api-mocking)
- [Blog post on API Mocking](https://dev.to/playwright/api-mocking-for-your-playwright-tests-47ah)
- [Docs on API Mocking](https://playwright.dev/docs/mock)
- [Release video on our Network Annotations feature which gives you a clearer view of what your API call and fulfillments are doing](https://youtu.be/pJiirfyJwcA)