Search posts, tags, users, and pages
Albert Oliva Roura
Good post!
Does Playwright have a way to validate the json schema we receive in a response?
Thanks!
Luca Del Puppo
Hi Albert Oliva Roura, Thanks.
To validate the JSON or you can use the expect directly, like in my example; you can find more on the jest documentation
Or you can build your own validation using other libraries like zod, typebox or fluent-json-schema.
The official way is by the expect, but I understand is not so simple.