Network Interception Lab

Every button on this page makes a real API call to your local server. Work through each step below, observe what actually happens, then learn how Playwright can intercept, mock, block, or monitor those same requests in your tests.

Response Mocking Security Testing Server Failures Network Monitoring

Replace a real server response with your own data — without changing the database.

Estimated Time: 20 sec Difficulty: Easy Method: route.fulfill() Status: Not Started

Replace a real server response with your own data — without changing the database.

Current Execution

Live results from the request(s) above appear here.

Test whether your app correctly blocks users from accessing data that isn't theirs.

Estimated Time: 30 sec Difficulty: Medium Method: route.continue() Status: Not Started

Test how your application behaves when the server is completely unreachable.

Estimated Time: 20 sec Difficulty: Easy Method: route.abort() Status: Not Started

Watch every request and response as they happen — without intercepting anything.

Estimated Time: 30 sec Difficulty: Medium Method: page.on() Status: Not Started

Go Deeper

Reference Center

Three professional patterns used in real Playwright test suites.

What problem does it solve?

Logging in through the UI before every test is slow and fragile. Instead, log in once, save the cookies and local storage to a file, then load that file instantly in every test that needs authentication.