Reputation: 43
A website is developed using Reactjs, which interacts with ethereum smart contract in the backend.
This smart contract requires one chrome extension (metamask) for transaction.
Now while using puppeteer it runs in the chromium where chrome extensions aren't available.
Also I wanna run this contract in parallel. That means it runs same contract multiple times at once in order to know how much time will it take to get the result when many users at once are using that website.
Upvotes: 3
Views: 411
Reputation: 18826
Discussed here, You can use --disable-extensions-except to enable only the extensions that you want to test:
var options = {
headless: false,
args: [
'--disable-extensions-except=/path/to/extension/',
'--load-extension=/path/to/extension/',
]
}
For loading multiple chrome extensions, you can pass a comma-seperated list;
var options = {
headless: false,
args: [
'--disable-extensions-except=/path/to/ext1/, /path/to/ext2/, /path/to/ext3/'
]
}
Note, it will not work in headless
mode, nor you can automate the extensions themselves.
You can create multiple pages/tabs with same metamask, or create different browser sessions to keep things seperate.
Upvotes: 2