fix(core): update

This commit is contained in:
2021-11-07 19:33:09 +01:00
parent 09a8888d47
commit 1ab34d909b
4 changed files with 32 additions and 76 deletions

View File

@ -27,7 +27,14 @@ export const getEnvAwareBrowserInstance = async (
args: chromeArgs,
pipe: true,
headless: true,
// executablePath: '/usr/bin/google-chrome'
...(() => {
const returnObject: any = {};
const googleChrome = plugins.smartshell.which.sync('google-chrome')
if(googleChrome) {
returnObject.executablePath = googleChrome
}
return returnObject;
})()
});
return headlessBrowser;

View File

@ -6,8 +6,9 @@ export { os };
// @pushrocks scope
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartenv from '@pushrocks/smartenv';
import * as smartshell from '@pushrocks/smartshell';
export { smartdelay, smartenv };
export { smartdelay, smartenv, smartshell };
// third party scope
import puppeteer from 'puppeteer';