do not use stdoutsocket for console logs on Windows (#52208)

This commit is contained in:
Dmitry Lemeshko 2019-12-05 18:42:04 +01:00 committed by GitHub
parent b66415e416
commit 9f024b8067
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,6 +136,20 @@ async function attemptToCreateCommand(
// See: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode
firefoxOptions.headless();
}
// Windows issue with stout socket https://github.com/elastic/kibana/issues/52053
if (process.platform === 'win32') {
const session = await new Builder()
.forBrowser(browserType)
.setFirefoxOptions(firefoxOptions)
.setFirefoxService(new firefox.ServiceBuilder(geckoDriver.path))
.build();
return {
session,
consoleLog$: Rx.EMPTY,
};
}
const { input, chunk$, cleanup } = await createStdoutSocket();
lifecycle.on('cleanup', cleanup);