microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.4k stars 3.63k forks source link

[Docs]: test-configuration For .Net #30890

Closed michael-freidgeim-webjet closed 4 months ago

michael-freidgeim-webjet commented 5 months ago

Page(s)

https://playwright.dev/docs/test-configuration exists but https://playwright.dev/dotnet/docs/test-configuration doesn’t exist

Description

The page “ Test configuration” https://playwright.dev/docs/test-configuration shows Node.js instructions. However when I tried to switch to .Net, it returned “ This page is not available for .NET.” It will be good to document how to do Test configuration in .Net

michael-freidgeim-webjet commented 5 months ago

I am not alone, who miss Playwright settings for .NET documentation https://medium.com/@dneprokos/playwright-with-net-what-is-it-useful-bafc85898b5

To be honest, I have not found a complete description of the supported Playwright settings for .NET. And this is something that really bothers me. Maybe there is a luck of documentation or maybe the .NET version of Playwright has limited support of config (compare to Node.js)

https://stackoverflow.com/questions/68169501/how-do-you-create-a-global-configuration-for-playwright-net

.

mxschmitt commented 5 months ago

Switching from the Node.js documentation to the .NET documentation is not always supported, since the doc structure is different. We recommend switching once and then following the guides on the left side along.

Playwright for Node.js is significant different, since it provides a test-runner while in .NET, we mostly provide a library with NUnit and MSTest integrations. So there is a dedicated chunk of documentation in Node.js, like in your case the test-configuration page, which is not needed in .NET.

We just released an update to the .NET docs which should make it more clear, does this help you?

michael-freidgeim-webjet commented 4 months ago

@mxschmitt Thanks for the links to. .Net documentation. I’ve posted a question on stackoverflow How to set values in Playwright BrowserContext options from config file? Please consider it as a feedback.

mxschmitt commented 4 months ago

ContextOptions can only be set via the runtime, see here: https://github.com/microsoft/playwright-dotnet/issues/2555