mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-16 15:52:24 +03:00
25 lines
731 B
JavaScript
25 lines
731 B
JavaScript
(async() => {
|
|
process.on('unhandledRejection', error => {
|
|
// Catch various errors as we launch non-browser binary.
|
|
console.log('unhandledRejection', error.message);
|
|
});
|
|
|
|
const [, , playwrightRoot, usePipe] = process.argv;
|
|
const options = {
|
|
pipe: usePipe === 'use-pipe',
|
|
ignoreDefaultArgs: true,
|
|
dumpio: true,
|
|
timeout: 1,
|
|
executablePath: 'node',
|
|
args: ['-e', 'console.error("message from dumpio")', '--']
|
|
}
|
|
console.error('using pipe: ' + options.pipe);
|
|
if (playwrightRoot.includes('firefox'))
|
|
options.args.push('-juggler', '-profile');
|
|
try {
|
|
await require(playwrightRoot).launch(options);
|
|
console.error('Browser launch unexpectedly succeeded.');
|
|
} catch (e) {
|
|
}
|
|
})();
|