question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where to specify puppeteer.use()?

See original GitHub issue

Could be a newbie question, or i’ve overlooked the readme - but I’m trying to add a puppeteer-extra plugin, i would like to know how to set up puppeteer since we are using jest-puppeteer.config.js?

Example:

// Add stealth plugin and use defaults (all tricks to hide puppeteer usage)
const StealthPlugin = require("puppeteer-extra-plugin-stealth")
puppeteer.use(StealthPlugin()) 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Macilcommented, Sep 11, 2020

You can use puppeteer-extra with jest-puppeteer by putting this in jest-puppeteer.config.js:

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());

require.cache[require.resolve('puppeteer')] =
  require.cache[require.resolve('puppeteer-extra')];
4reactions
gregbergecommented, Jul 14, 2019

It is not yet supported, sorry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Puppeteer | Puppeteer
Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol. Puppeteer runs in headless mode by...
Read more >
Puppeteer quick start - Chrome Developers
By default, Puppeteer downloads and uses a specific version of Chromium so its API is guaranteed to work out of the box. To...
Read more >
Getting to Know Puppeteer Using Practical Examples
Presently, the way to go is by setting the PUPPETEER_PRODUCT environment variable to firefox and so fetching the binary of Firefox Nightly. We ......
Read more >
How to Use Puppeteer With Node.js - freeCodeCamp
How to Set Up Node.js and Puppeteer. First make a directory which you will be working with by right clicking on your preferred...
Read more >
Puppeteer documentation - DevDocs
PUPPETEER_CHROMIUM_REVISION - specify a certain version of Chromium you'd like Puppeteer to use. See puppeteer.launch([options]) on how executable path is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found