How to wait for all images to load from page.evaluate function in puppeteer when the DOM is populated using a client side function
问题 I am trying to make the code execution wait for all images to load before puppeteer takes a screenshot. My DOM gets populated when initData() function is called, which is defined in the client side js file. Delay or timeout is an option but I am sure there must be a more efficient way of doing it. (async (dataObj) => { const url = dataObj.url; const payload = dataObj.payload; const browser = await puppeteer.launch({ headless: false,devtools:false}); const page = await browser.newPage(); await