Open guodeo opened 2 years ago
For now I can see this for timeout in .NET documentation. https://playwright.dev/dotnet/docs/next/api/class-browsercontext#browser-context-set-default-timeout although there are no example code blocks for it
@mxschmitt is there anything we can do to improve this
Which timeout do you mean? In Playwright for .NET there are multiple timeouts:
a) the test-runner timeout, depends then on your test-harness, e.g. nunit/mstest etc. b) the timeout of your individual actions, you can pass it manually inside each API call as an option or you call context.SetDefaultTimeout c) the Expect timeout, this is 10 seconds by default, we have a tracking issue to make it configurable: https://github.com/microsoft/playwright-dotnet/issues/2237
Thanks Max b) and c) are what I was after. I was a bit confused because there was a dedicated documentation page on timeouts for .js but not for .NET
We'll keep this issue open to track the progress for adding this dedicated page!
@guodeo If we compare it to js, with js there is configuration so the playwright acts a little like a framework and less then a library. My recommendation is to use the appettings.json file to configure the timeout. Of course as a result you have to use Program.cs (And this can be complicated)or Startup.cs (This is my recondition) for example:
On the playwright documentation for node.js, it has documentation, however for the .net application there is no such page... how can I change the default timeout for .net please?