Skip to content

Tag: node.js

import JSON file with node.js

I want data from the config.json file import to the index.js file in the same dir. so I had it before now i would change the string so i need a json object, but how? Answer In ES5 you can do it by The object will contain your JSON. In ES6 Using fs module synchronously

How to click and hold in Puppeteer

I am trying to click and hold using Puppeteer. I tried using page.click inside a while loop but it didn’t work. I also tried this: Any ideas how to do this? Answer There are a few tools to trigger a mouse hold in Puppeteer: page.click, mouse.click, mouse.down and mouse.up. page.hover can be useful for p…