I have to make an API request to an endpoint and see if it returns a specific object. How can I make the same API request multiple times over a 60 second period until it returns that object using playwright? Here’s what I tried
await this.page.waitForResponse(
async resp =>
resp.url().includes("test") &&
resp.status() === 200 &&
((await resp.json()) as any).libraries.some((lib: { name: string }) => lib.name === libraryName),
{
timeout: 60000
}
);
But I am pretty sure it doesn’t make the same request multiple times