-
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
[Question] Does or will playwright support multiple browser instances in the same run? #1736
Comments
You can start multiple browsers and use them also in parallel like this example will show: https://try.playwright.tech/?s=hlae6 To simplify that you could also write some kind of helper function which executes common statements (change the navigation e.g.) via a single function call on all the browsers. |
Running multiple instances (especially in CI) can be limited by resources. Be careful not to spin up too many instances and shut down the ones you're done with. Too many instances in a limited environment will cause all instances to slow to a crawl. I've had success in most CI environments with 8 or fewer instances. I use an object pool to limit the number of instances and recycle instances when a test suite completes. |
@mxschmitt thanks, it looks straight forward from the example.. @AutoSponge that's a good point! I like the idea of object pool/recycling. |
(I can recommend bottleneck for that: https://www.npmjs.com/package/bottleneck) |
For example with a messaging app, it's common to want to test two different clients interacting with some page, is this or will this be possible with playwright?
The text was updated successfully, but these errors were encountered: