Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playwright): support HAR replaying #3990

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

kobenguyent
Copy link
Collaborator

@kobenguyent kobenguyent commented Nov 11, 2023

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)

@kobenguyent kobenguyent merged commit c5f3d3d into 3.x Nov 22, 2023
12 checks passed
@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