From 8c9332b62e0f751f6b6a3b679d9c535318647a92 Mon Sep 17 00:00:00 2001 From: Eric Bidelman Date: Tue, 7 Nov 2017 13:19:54 -0800 Subject: [PATCH] docs(Readme): add loading extensions example (#1308) This patch adds a tips-and-tricks section to the `readme.md` that explains how to load extension to puppeteer. --- examples/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/README.md b/examples/README.md index 634c32c8..55832a93 100644 --- a/examples/README.md +++ b/examples/README.md @@ -6,6 +6,23 @@ Assuming you have a checkout of the Puppeteer repo and have run yarn (or npm i) NODE_PATH=../ node examples/search.js ``` +# Tips & Tricks + +### Load a Chrome extension + +By default, Puppeteer disables extensions when launching Chrome. You can load a specific +extension using: + +```js +const browser = await puppeteer.launch({ + headless: false, + args: [ + '--disable-extensions-except=/path/to/extension/', + '--load-extension=/path/to/extension/', + ] +}); +``` + # Other resources > Other useful tools, articles, and projects that use Puppeteer.