const puppeteer = require('puppeteer');const path = require('path');(async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.goto('xxxxxxxx'); await page.screenshot({path: path.join(__dirname,'example.png'),fullPage: true, omitBackground: true }); await browser.close(); })();
页面是用react写的,其中有个Loading页面,每次截图都是loading,不是loading结束后的。
拉风的咖菲猫
相关分类