I am capturing screenshots of webpages using the puppeteer node module.
Some pages have an input field that automatically gets the focus.
I would like the blinking cursor to not appear on the screenshot. Is there an option to do so?
You can implement this answer in puppeteer using addStyleTag
:
const styleContent = `
input {
color: transparent;
text-shadow: 0 0 0 black;
}
input:focus {
outline: none;
}
`;
await page.addStyleTag({ content: styleContent });