Open SimonSikstrom opened 2 months ago
The reason we haven't taken any action on this is that we didn't want a sub par solution. If we improve the replay from har logic we'd like its functionality to y comparable to Web Page Replay. If your proposed change aligns with this standard, we would be open to reviewing and accepting PRs.
🚀 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 #18288Example
Have a recorded
.har
with a new server state after reload.Replay
.har
using aconsume
(or similar) flag forrouteFromHAR
.Implementation POC https://github.com/microsoft/playwright/compare/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.