playwright-community/playwright-go

Visual comparisons

ivaylo321 opened this issue · 2 comments

There are two methods toHaveScreenshot and toMatchSnapshot described in this doc:
https://playwright.dev/docs/test-snapshots

From what I see they are not implemented in the Go version of Playwright - are there plans to do so?

I am trying to implement something similar myself. For the images I am thinking about creating a screenshot and then using the Go image and color packages to compare it with an expected image, from what I understand I should be able to compare the images pixel by pixel this way. I would be grateful if someone has already done something similar and is willing to share an example.

Doc metions using pixelmatch, here is a go port, try using it.