microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.51k stars 241 forks source link

[Question]: Visual comparisons Feature Parity #1854

Open infinitejest69 opened 2 years ago

infinitejest69 commented 2 years ago

Your question

Hi Just wanted to check what the approach will be in terms of feature parity with the JavaScript version of playwright.

I was looking for some basic visual testing and noticed the JS version offers this via Pixelmatch test-snapshots

Is the plan that the dotnet version will have feature parity with JS version or do we need to look at other implementations to try achieve the same feature of the Java script version.

pavelfeldman commented 2 years ago

Playwright Library has feature parity across languages. Visual regression testing is a part of the @playwright/test, a test runner for Playwright on Node.js, so it is missing on .Net.

In one of the next versions, you will likely see https://playwright.dev/docs/next/api/class-locatorassertions/ for .Net. And only after that, we are likely to add visual assertions into that set.

infinitejest69 commented 2 years ago

Thanks for the reply. is there a backlog or some roadmap where we can upvote features we would like to see ported before others or is features done on a case by case basis

Skintkingle commented 2 years ago

I would echo the OPs question. We're looking to adopt Playwright .Net into our testing pipeline and we were very excited to see Visual comparisons in the docs, and then sad when we realised it wasn't in the .Net flavour. Is there a feature upvoting site we can contribute to to help prioritise this higher?

infinitejest69 commented 2 years ago

Just going to give this a bump now 1.18 is out

are we likely to see this feature enabled within playwright or does anyone know good open source alternatives that will play nicely with playwright ?

NikkTod commented 2 years ago

Hey guys, @pavelfeldman @mxschmitt as we are seeing a lot of effort into visual testing for @playwright/test, do you have any timeline as when we could see this also for .Net?

I am just bringing this up as it has good voting and could be a big boost for using playwright instead of other test fremworks, but soon it will be a year from when this ticket was created.

infinitejest69 commented 1 year ago

Updating this for future travels who get their question marked as answered with this post Thanks to @vmachacek

You can use this to solve some of the issue with a few small lines of code Verify.HeadlessBrowsers and this blog that show how easy it is to use snapshot-testing-with-verify

ukaszef commented 1 year ago

hey, any updates on the topic? i'm migrating my selenium-based framework to playwright in .net, visual testing is one of the important points for the nearest future - would love to be able to use playwright for this instead of external tooling. really sad to see it in js/ts and not in .net :(

dotnetmaniac commented 11 months ago

Hello Playwright team! Can we hope for this feature anytime in the near future? We have been using Playwright for some time now, and we have come across this requirement and looks like we are in trouble as it's not supported in c#.

We would really appreciate any response/suggestions.

zandraswo commented 11 months ago

It is a pity this is not supported in dotnet version. It would provide a huge benefit in a lot of the tests. I wanted to migrate to Playwright and this is a huge dealbreaker. Hope this gets implemented soon.

ddweber commented 9 months ago

Any updates on this? This feature is the missing piece that would allow us to migrate from tools like Ranorex and others to the easy and awesome playwright.

Awwm12 commented 9 months ago

Also looking for an update on this as we're starting a new project soon that would really benefit from this. Would really like to use Playwright with C#

auslavs commented 8 months ago

I remembered this issue from late 2021 when I wrote my first set of playwright tests. It would still be nice to have this feature.

MattHorrocksNetwealth commented 7 months ago

@mxschmitt

I was just looking for this exact functionality in the docs. I've been doing some searching in the repo, and it looks like ToMatchSnapshot is used internally, or there's at least a PR to rename existing functionality to ToMatchSnapshot?

https://github.com/microsoft/playwright-dotnet/pull/2927

Can this private implementation be made public?

mxschmitt commented 6 months ago

The ToMatchSnapshot method inside this codebase is by far not as powerful as the one upstream in Node.js is. We don't feel confident making it public as of today. I recommend copying it into your own code base for now until we have figured out e.g. asset handling etc.

kudlata commented 5 months ago

Hi, I'm really waiting or this feature too. I hope it will be appear very soon :)