hi all,
when i started my project and wants to make use of parallelism in playwright, i encountered an issue where i got rate-limited. imagine i am running 3 tests in parallel, each of which will call this endpoint /createProject
. so i mock the API using page.route
. however this does not solve my problem, it seems like the actual API endpoint is still being hit. may i know if there's a way to intercept the API properly?
thanks!
This thread is trying to answer question "Is there a way to properly intercept an API to avoid rate limits while running parallel tests in Playwright?"
Mocking the api usually works. https://playwright.dev/docs/mock "Devil lies in the details" so share some code (maybe) to see why the endpoint is being hit.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].