[api] add Puppeteer.executablePath() method (#771)

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

Fixes #745
This commit is contained in:
Andrey Lushnikov
2017-09-13 17:39:18 -07:00
committed by GitHub
parent 89e923d5f0
commit d7e673645a
4 changed files with 25 additions and 0 deletions

View File

@@ -111,6 +111,14 @@ class Launcher {
}
}
/**
* @return {string}
*/
static executablePath() {
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision);
return revisionInfo.executablePath;
}
/**
* @param {string} options
* @return {!Promise<!Browser>}