Skip to content

feat(playwright): support HAR replaying - #3990

Merged
kobenguyent merged 2 commits into
3.xfrom
3989-feature-support-the-har-replay-with-playwright
Nov 22, 2023
Merged

feat(playwright): support HAR replaying#3990
kobenguyent merged 2 commits into
3.xfrom
3989-feature-support-the-har-replay-with-playwright

Conversation

@kobenguyent

@kobenguyent kobenguyent commented Nov 11, 2023

Copy link
Copy Markdown
Collaborator

Motivation/Description of the PR

[replayFromHar]
Replaying from HAR

 // Replay API requests from HAR.
 // Either use a matching response from the HAR,
 // or abort the request if nothing matches.
   I.replayFromHar('./output/har/something.har', { url: "*/**/api/v1/fruits" });
   I.amOnPage('https://demo.playwright.dev/api-mocking');
   I.see('CodeceptJS');
[Parameters]
harFilePath [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Path to recorded HAR file
opts [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)? [Options for replaying from HAR](https://playwright.dev/docs/api/class-page#page-route-from-har)

Applicable helpers:

  • Playwright

Type of change

  • 🚀 New functionality

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@Arhell
Arhell requested a review from DavertMik November 16, 2023 00:09
@kobenguyent
kobenguyent merged commit c5f3d3d into 3.x Nov 22, 2023
@kobenguyent
kobenguyent deleted the 3989-feature-support-the-har-replay-with-playwright branch November 22, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] support the HAR replay with Playwright

2 participants