2019-11-19 05:18:28 +03:00
|
|
|
(async() => {
|
2020-01-14 04:36:46 +03:00
|
|
|
const [, , playwrightRoot, product, options] = process.argv;
|
2020-02-05 23:41:55 +03:00
|
|
|
const browserServer = await require(playwrightRoot)[product.toLowerCase()].launchServer(JSON.parse(options));
|
|
|
|
browserServer.on('close', (exitCode, signal) => {
|
2020-01-29 00:07:53 +03:00
|
|
|
console.log(`browserClose:${exitCode}:${signal}:browserClose`);
|
|
|
|
});
|
2020-02-05 23:41:55 +03:00
|
|
|
console.log(`browserPid:${browserServer.process().pid}:browserPid`);
|
|
|
|
console.log(`browserWS:${browserServer.wsEndpoint()}:browserWS`);
|
2019-11-19 05:18:28 +03:00
|
|
|
})();
|