Live data from Hacker News

Playwright for .NET is now stable

github.com

41–50 of 66 posts

Re: Playwright for .NET is now stable

#41
post #38

Earlier quoted context omitted.

So what's the point of it then? Why add more layers of unnecessary abstraction? Why don't just use the node.js library then?

Because for some teams it's easier to write tests in plain C# with NUnit/xUnit libs.

But why? Why shoehorn everything into a single technology? Is it so that certain people never have to learn anything else in their entire life anymore?

Re: Playwright for .NET is now stable

#43
post #38

Earlier quoted context omitted.

Because for some teams it's easier to write tests in plain C# with NUnit/xUnit libs.

But why? Why shoehorn everything into a single technology? Is it so that certain people never have to learn anything else in their entire life anymore?

Projects written in java/c#/python don't have to write their own ad-hoc http api in nodejs to access playwright from their language.

Re: Playwright for .NET is now stable

#44
post #38

Earlier quoted context omitted.

Because for some teams it's easier to write tests in plain C# with NUnit/xUnit libs.

But why? Why shoehorn everything into a single technology? Is it so that certain people never have to learn anything else in their entire life anymore?

Well, a pretty good reason is that C# is statically typed, which a lot of developers prefer. It's arguably a much more powerful language than JavaScript too.

Personally, I work with both C# and JavaScript, and I'd happily use the C# version of Playwright to write and run UI tests.

Re: Playwright for .NET is now stable

#45

Oh, I didn't know this existed. Definitely going to try this. I'm currently using Puppeteer Sharp ( https://github.com/hardkoded/puppeteer-sharp ) and something like: > await page.GotoAsync(" https://playwright.dev/dotnet "); > await page.ScreenshotAsync(new PageScreenshotOptions() { Path = "screenshot.png" }); Is broken, if you have background images in CSS the screenshot happens after Page Load is completed but bef…

you need to put this before the Screenshot ? await page.WaitForLoadStateAsync(LoadState.NetworkIdle);

I’ll give it a go thanks.

Re: Playwright for .NET is now stable

#46
post #38

Earlier quoted context omitted.

Because for some teams it's easier to write tests in plain C# with NUnit/xUnit libs.

But why? Why shoehorn everything into a single technology? Is it so that certain people never have to learn anything else in their entire life anymore?

Because it's nice to have all tests in a single view and a single language, both unit, integration and end to end.

Also regardless of keeping it in a _single_ language or tool, one might prefer to write tests in a .net language instead of js or python.

Re: Playwright for .NET is now stable

#47
post #38

Earlier quoted context omitted.

Because for some teams it's easier to write tests in plain C# with NUnit/xUnit libs.

But why? Why shoehorn everything into a single technology? Is it so that certain people never have to learn anything else in their entire life anymore?

Because the “Enterprise Architect” who hasn’t done any actual coding in 15 years, and still preaches 15-year-old FUD about open source, will be openly hostile to anything that isn’t superficially related to his anointed tech stack. Which will most likely be either .NET or Java.

Re: Playwright for .NET is now stable

#48
post #11

Earlier quoted context omitted.

Same guy does playwright sharp, he should really have more supporters

OH WOW! I had no idea! Yeah he does deserve more support. I still donno why MS can't contribute to projects directly. But I'm happy there's another possible solution to my problem.

.NET Foundation is where a lot of the contribution back to the community happens, I believe.

Re: Playwright for .NET is now stable

#49
post #20

Oh, I didn't know this existed. Definitely going to try this. I'm currently using Puppeteer Sharp ( https://github.com/hardkoded/puppeteer-sharp ) and something like: > await page.GotoAsync(" https://playwright.dev/dotnet "); > await page.ScreenshotAsync(new PageScreenshotOptions() { Path = "screenshot.png" }); Is broken, if you have background images in CSS the screenshot happens after Page Load is completed but bef…

I'm using Playwright right now, migrating horrendous Selenium tests at work and it's a real breeze of fresh air. It just works, it comes battery included with superb debugging tools (step by step execution directly in the browser, trace dumping for further analysis, reliable interactions recorder with pretty decent code generation ...). It's an amazing piece of software for a domain that was kept on the side of the r…

Is it less flaky than Cypress? We're constantly running into Cypress bugs, when we find a workaround for one, two more show up.

Re: Playwright for .NET is now stable

#50
post #44

Earlier quoted context omitted.

But why? Why shoehorn everything into a single technology? Is it so that certain people never have to learn anything else in their entire life anymore?

Well, a pretty good reason is that C# is statically typed, which a lot of developers prefer. It's arguably a much more powerful language than JavaScript too. Personally, I work with both C# and JavaScript, and I'd happily use the C# version of Playwright to write and run UI tests.

Typescript adds static type definitions to javascript. Microsoft's own VSCode is written in typescript. Being able to gradually move from one to another as you augment your existing code with type definitions makes it easier to integrate typescript in existing projects.
Post reply on HN