Skip to content

Conversation

@aslushnikov
Copy link
Contributor

This patch adds Puppeteer.executablePath() method to query the path
of bundled chromium.

Fixes #745

This patch adds Puppeteer.executablePath() method to query the path
of bundled chromium.

Fixes puppeteer#745
docs/api.md Outdated
This methods attaches Puppeteer to an existing Chromium instance.

#### puppeteer.executablePath()
- returns: <[string]> A path where Puppeteer expects to find bundled chromium. Chromium might not exist there if the download was skipped with `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to the env vars section

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/chromium/Chromium

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


This methods attaches Puppeteer to an existing Chromium instance.

#### puppeteer.executablePath()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header is missing in the TOC.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

@JoelEinbinder JoelEinbinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as long as the other comments are addressed.

@Janpot
Copy link
Contributor

Janpot commented Sep 13, 2017

I added an alternative solution for #745
I think it could also work by just providing the executablePath in the environment when spawning the child process. That solution wouldn't require public API change.

@aslushnikov
Copy link
Contributor Author

@Janpot the puppeteer.executablePath is good by itself: i've just seen someone reaching out to ChromiumDownloader to pull the executablePath: https://github.com/karma-runner/karma-chrome-launcher#headless-chromium-with-puppeteer

@aslushnikov aslushnikov merged commit d7e6736 into puppeteer:master Sep 14, 2017
@aslushnikov aslushnikov deleted the add-executable-path branch October 10, 2017 00:19
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

Successfully merging this pull request may close these issues.

5 participants