Puppeteer is a Node library that provides a high-level API to control Microsoft Edge (Chromium) using the DevTools Protocol. Puppeteer launches headless browsers by default. Headless browsers do not display a UI, so instead you must use the command line. You may also configure Puppeteer to run full (non-headless) Microsoft Edge as well.
Microsoft Edge turns every new tab into a portal for productivity with quick access to Office apps, files, sites and built-in Microsoft Search. Unlocks remote work Use Microsoft Edge across your devices whether at home or work with cross-platform support and profiles that sync. Organize your research with Collections. If you’re having to suddenly design your. Get Microsoft Edge for iOS and Android. Learn more: Accessibility with Microsoft Edge Skip to main content.
By default, when you install Puppeteer, the installer downloads a recent version of Chromium, the open-source browser that Microsoft Edge is also built upon. If you have Microsoft Edge (Chromium) installed, you may use puppeteer-core. puppeteer-core
is a lightweight version of Puppeteer that launches an existing browser installation, like Microsoft Edge (Chromium). To download Microsoft Edge (Chromium), navigate to Download Microsoft Edge Insider Channels.
Installing puppeteer-core
You may add puppeteer-core
to your website or app with one of the following commands.
Launch Microsoft Edge with puppeteer-core
Note
puppeteer-core
relies on Node v8.9.0 or later. The example below uses async
/await
which is only supported in Node v7.6.0 or later. Run node -v
from the command-line to ensure you have a compatible version of Node.js.
puppeteer-core
should be familiar to users of other browser-testing-frameworks like WebDriver. You create an instance of the browser, open a page, and then manipulate it with the Puppeteer API. In the following code sample, puppeteer-core
launches Microsoft Edge (Chromium), navigates to https://www.microsoftedgeinsider.com
, and saves a screenshot as example.png
.
Copy the following code snippet and save it as example.js
.
Change executablePath
to point to your installation of Microsoft Edge (Chromium). For example, on macOS, the executablePath
for Microsoft Edge Canary should be set to /Applications/Microsoft Edge Canary.app/
. To find the executablePath
, navigate to edge://version
and copy the Executable path on that page or install the edge-paths package with one of the following commands.
The code sample below uses the edge-paths package to programmatically find the path to your installation of Microsoft Edge (Chromium) on your OS.
Finally, set executablePath: EDGE_PATH
in example.js
. Save your changes.
Microsoft Edge For Mac
Note
Microsoft Edge Full Page Screenshot
Microsoft Edge (EdgeHTML) does not work with puppeteer-core
. You must install the Microsoft Edge Insider channels to continue following this example.
Now, run example.js
from the command line.
puppeteer-core
launches Microsoft Edge, navigates to https://www.microsoftedgeinsider.com
, and saves a screenshot of the webpage. Customize the screenshot size with page.setViewport().
This is just a simple example of the automation and testing scenarios enabled by Puppeteer and puppeteer-core
. For more information about Puppeteer and how it works, navigate to Puppeteer.
Microsoft Edge Full Download
Getting in touch with the Microsoft Edge DevTools team
The Microsoft Edge Developer team is eager to hear your feedback about using Puppeteer, puppeteer-core
, and Microsoft Edge. Use the Send Feedback icon in the Microsoft Edge DevTools or tweet @EdgeDevTools to let the Microsoft Edge team know what you think.