await page.route("**/api/cart", async (route) => { await route.fulfill({ status: 200, contentType: "application/json", body: JSON.stringify({ count: 5 }), }); });