Injecting CSS into site with Puppeteer
addStyleTag: You can use page.addStyleTag to add some style which will either add a link or style tag based on your options which can be a url, path or some css content. // url await page.addStyleTag({url: ‘http://example.com/style.css’}) // path, can be relative or absolute path await page.addStyleTag({path: ‘style.css’}) // content await page.addStyleTag({content: ‘.body{background: red}’}) evaluateOnNewDocument: … Read more