Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set chromium executable path #3

Open
willi84 opened this issue Dec 1, 2020 · 0 comments
Open

Set chromium executable path #3

willi84 opened this issue Dec 1, 2020 · 0 comments

Comments

@willi84
Copy link

willi84 commented Dec 1, 2020

if system is not able to detect chromium with puppeteer you are able to set it like that

const browser = await puppeteer.launch({executablePath: '/path/to/Chrome'});

(source: https://github.com/puppeteer/puppeteer#default-runtime-settings)

it would be cool, if I can put the same option to helpers/open-browser.js

I tried it by overriding manually:

const puppeteer = require('puppeteer');

module.exports = async function openBrowser(options = {}) {
  const launchOptions = {
    headless: true,
        executablePath: '/my/path/toChrome',
    ...options,
  };

  return await puppeteer.launch(launchOptions);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant