Browser4
Browser4 copied to clipboard
Playwright is not thread safe so every PlaywrightBrowser and all it's PlaywrightDriver should be bounded to a single thread
Playwright is not thread safe so every PlaywrightBrowser and all it's PlaywrightDriver should be bounded to a single thread.
Playwright Java is not thread safe, i.e. all its methods as well as methods on all objects created by it (such as BrowserContext, Browser, Page etc.) are expected to be called on the same thread where the Playwright object was created or proper synchronization should be implemented to ensure only one thread calls Playwright methods at any given time. Having said that it's okay to create multiple Playwright instances each on its own thread.
@see https://playwright.dev/java/docs/multithreading#introduction