mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-16 07:33:35 +03:00
22 lines
662 B
JavaScript
22 lines
662 B
JavaScript
(async() => {
|
|
process.on('unhandledRejection', error => {
|
|
// Catch various errors as we launch non-browser binary.
|
|
console.log('unhandledRejection', error.message);
|
|
});
|
|
|
|
const [, , playwrightRoot, product, useWebSocket] = process.argv;
|
|
const options = {
|
|
ignoreDefaultArgs: true,
|
|
dumpio: true,
|
|
timeout: 1,
|
|
executablePath: 'node',
|
|
args: ['-e', 'console.error("message from dumpio")', '--']
|
|
}
|
|
console.error('using web socket: ' + options.webSocket);
|
|
try {
|
|
await require(playwrightRoot)[product.toLowerCase()].launchServer(options);
|
|
console.error('Browser launch unexpectedly succeeded.');
|
|
} catch (e) {
|
|
}
|
|
})();
|