-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Implement Network Throttling #8622
Comments
We don't support this at the moment. You can defer your network via awaiting time in await page.route('**/*', async route => {
await new Promise(f => setTimeout(f, 100));
await route.continue();
}); That won't be accurate in terms of latency and throughput, but you can simulate delays in network responses that way. See here #6038 If you want to enable it on Chromium only, see here: #6038 (comment) |
@uchagani: what is your use case? |
a couple use cases but they might be handled by the workaround above:
|
Since the solution above works for you use case, let's collect more feedback on this. |
I think it works for puppeteer :) i used it in codeceptjs wrapper. |
If you want to enable it via CDP, see here: #6038 (comment) |
I tried the solution @mxschmitt gave earlier. I've found that for high values ( >200 ) the Page closes and almost all my tests fail ( it's a bit random which ones fail! ). Anyone seen something similar? To implement the chrome solution that was posted earlier, I need to access the |
to answer my question, I realised it's part of the arguments of so test('My example test', async ({page, browser}) => {
//console.log(browser)
...
}) I cannot get it to work though.
without the context/cdpSession part, the tests work. :/ edit: |
Why was this issue closed?We are prioritizing the features based on the upvotes, recency and activity in the issue thread. It looks like this issue only has a handful of upvotes, has not been touched recently and/or we lack sufficient feedback to act on it. We are closing issues like this one to keep our bug database maintainable. Please feel free to open a new issue and link this one to it if you think this is a mistake. |
This would be very useful |
How do you do this with |
I couldn't find anything regarding this in the documentation but could we get the ability to throttle the network throughput?
The text was updated successfully, but these errors were encountered: