paint-brush
How to Use Mock API in Playwrightby@puppo
2,580 reads
2,580 reads

How to Use Mock API in Playwright

by Luca Del Puppo4mFebruary 9th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Today I want to talk about how to mock API with Playwright. To do that, I add a new feature to the usual example. When one of the players wins, the system sends a POST request to the URL http://localhost:3001/api/winners to save the history of the results of the games.
featured image - How to Use Mock API in Playwright
Luca Del Puppo HackerNoon profile picture
Luca Del Puppo

Luca Del Puppo

@puppo

Microsoft MVP, Full Stack developer and javascript enthusiastic.

0-item

STORY’S CREDIBILITY

Code License

Code License

The code in this story is for educational purposes. The readers are solely responsible for whatever they build with it.

L O A D I N G
. . . comments & more!

About Author

Luca Del Puppo HackerNoon profile picture
Luca Del Puppo@puppo
Microsoft MVP, Full Stack developer and javascript enthusiastic.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite