I have an element that has this style color: #dc7709 and I want to check if that element's text is of that color. How do I do that with Puppeteer or playwright?
You can use window.getComputedStyle. Notice that it will return an rgb
value:
assert(await page.$eval('span', e => getComputedStyle(e).color)).toBe('rgb(220, 119, 9)');