Rayrun
โ† Back to Discord Forum

.NET vs TypeScript

HI there, Good Day. is there any diffrence between C# and TypeScript tests in Playwright? We are currently deciding on which language to use.

Can anyoneplease confirm that Typescript and C# have the same level of functionality in Playwright?

This thread is trying to answer question "Is there any difference between C# and TypeScript tests in Playwright and do they have the same level of functionality?"

12 replies

Hi! there are differences like visual testing or the custom html reporter, the new ui mode are only in TS

Is there any plans for C# to catch up?

Is there documentation that compares the feature availbility of each language?

ibrahim.bektas
ibrahim.bektas

The main PW developement is in Typescipt/Javascript so the TS will always ahead of the other implementations. -> If you want test just your web with PW in your Framework i would recommend to use TS. If you want to have a multi purpose Framework included some Desktop Testing then consider a .NET framework

debbieobrien
debbieobrien

basically in node we built a custom test runner which gives us more capabilites of adding features such as ui mode, html reporter, vs code extension etc. all other languages are behind in features. Thanks for suggestion on docs to compare feature availability per lang, will see if I can make that happen. in meantime I suggest trying out both and seeing for yourself the experience and which you are more happier with.

@ibrahim.bektas: Thanks for the response @ibrahim.bektas , we are testing web based, so we will probably use TypeScript given it has the latest features and other benefits.

Thanks for the response @ibrahim.bektas , we are testing web based, so we will probably use TypeScript given it has the latest features and other benefits.

@debbieobrien: Thanks Debbie, We will probably use TypeScript given it has the latest features and other benefits.

Thanks Debbie, We will probably use TypeScript given it has the latest features and other benefits.

I am working on a framework built on top of Playwright.NET and I love it sooo much. It is focused on bulding POM, which is the only way to do tests for more complex websites... I hope I can publish this framework as an open source soon ๐Ÿ™‚ But it does not belong to me, but it belongs to my company, but my boss told me he wouldn't have a problem with making it open source ๐Ÿ™‚

And while I totally understand, that Typescript is most used with Playwright, I totally loves Playwright.NET and would NEVER EVER want to build my tests with Typescript.. Yeah Typescript is not that bad as Javascript is, but it is kinda like repair of the bad, that still get's compiled into this Javascript mess... On the other hand, C# is the programming language that is far superior, and the whole .NET ecosystem is fantastic, NuGet is sooooo much better then NPM and working in Visual Studio is soooo fantastic... I have a Resharper bought there, I use Metalama, Roslyn (generators mostly, but I want to add some nice analyzers and code fixes), NUnit, and many awesome C# libraries... I have GitHub Copilot there, and it can help me as well ๐Ÿ™‚ I created my own C# implementation of XPATH, so it is much more simple to work with, than with strings... I totally don't like to write XPATH just in simple string, I had sooo many typos there, it was so sad... So the whole experience I am trying to build is super fantastic ๐Ÿ™‚

I understand, that for developers, that already knows JS/TS, it is their preferrable language, but for those, who knows C# is the very best programming language in the world (besides C++, but that is meant for a little bit different purpose, mostly perfect for geeks ๐Ÿ˜„ ), so whenever I see that everybody suggest to use TS, I really like to stand this opinion, that nooooo, try Playwright.NET and try to understand, that it is muuuuch muuuuch better, although more work needs to be done at the beginning, but it is worth it !!!

And I hope I will realease my open source framework soon ๐Ÿ™‚

if you consider BDD, then I would sggest specflow + playwright + livingdoc Its a really nice setup

@debbieobrien, you should put more effort into Playwright.NET, there are still many people that loves C# and .NET, they can develop websites now purely in C# using Blazor, so it is not like everybody will use Javascript / Typescript forever, when there is a WebAssembly ๐Ÿ™‚ so Playwright with TS has the most important advantage: that you guys put more effort into it, but Playwright.NET on the other hand has some more serious advantages ๐Ÿ˜„

debbieobrien
debbieobrien

you are 100% right @petko147 all we need is to be able to hire more developers who can work on that for us. only a matter for time but for now we simply can't.

Yeah alright, I understand ๐Ÿ™‚ Don't worry, I hope that once I release my open-source framework on top of Playwright.NET, that some other guys will join it, and make it even better ๐Ÿ™‚ Then even you can take a look at it, I would be super happy if you do ๐Ÿ˜„ ๐Ÿ™‚

I am a big fan of .net I share my c# framework, one disadvantage is the lack of good reporter in .net, but I can integrate with some third party tools like qase or azure devops. I was wondering how playwright is supported, sometimes some microsoft products are retired like Visual Studio for mac, silverlight, xamarin forms, sometimes I saw some comments that could be the same for playwright

https://github.com/apis3445/saucedemo

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.