ChainSafe / dappeteer

[DEPRECATED]🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
Other
491 stars 152 forks source link

How to inject and use `puppeteer-extra` in a dappeteer browser in 4.0.2? #232

Open gakuzen opened 1 year ago

gakuzen commented 1 year ago

Describe the problem Hi, I am trying to use puppeteer-extra and its plugins to launch a dappeteer browser instance. In 4.0.2, there is no way to do this. However, in older versions, eg. 3.0.0, a custom puppeteer instance can be passed in the first argument of dappeteer.launch(). Is there any workaround in 4.0.2?

System:

MohammadAbuzar945 commented 1 year ago

It looks like in version 4.0.2 of dappeteer, the launchfunction no longer accepts a custom Puppeteer instance as an argument. Instead, it creates a new instance of Puppeteer internally and uses that to launch a new browser.

If you need to use a custom Puppeteer instance, you can try downgrading to an older version of dappeteer that still supports this feature. For example, you could try using version 3.0.0, which you mentioned allows you to pass a custom Puppeteer instance to the launchfunction.