Closed
Description
🚀 Feature Request
Add ability to consume each matching entry using routeFromHAR
, then it would be possible to have a recorded .har
with multiple matching entries without needing to switch .har in the middle of the tests.
Possible solution to #18288
Example
Have a recorded .har
with a new server state after reload.
Replay .har
using a consume
(or similar) flag for routeFromHAR
.
await context.routeFromHAR(path, {
consume: true
});
Implementation POC main...SimonSikstrom:playwright:consume-har-entry-18288
Motivation
Its not possible to handle subsequent requests using har replay, see #18288 .
My proposal is to add ability to consume each matching entry with routeFromHAR
, then it would be possible to have a recorded .har
with many matching entries that could return different results for subsequent calls.