I am embedding Playwright in my Scala code, and need to control browser downloading in code, so I need to set environment variables (PLAYWRIGHT_BROWSERS_PATH, PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD) on the ProcessBuilder used to run the driver.
Since PipeTransport and Connection constructors, Playwright.driverProcess and Playwright.initSharedSelectors() are not public, this results - in addition to duplicating the code of the PlaywrightImpl.create() - in the use of reflection.
It would be cleaner if a flavor of Playwright.create() was added that takes an environment Map<String, String> and delegates
to a similar flavor of PlaywrightImpl.create(), which in turn calls pb.environment().putAll() on the ProcessBuilder...