I m trying to take a screenshot of a section on the page and compare it with another image already saved using playwright and .NET. I managed to take the screenshot but i cant do the comparison. On playwright site, they show how to do it using javascript but there is no equivalent in .Net. can anyone please advise how to make the code below works in .NET. Thank you
expect(await.Locator(".layer").ScreenshotAsync.toMatchSnapshot('home.png', { threshold: 0.2 });