Closed MWRAUTO closed 8 months ago
As workaround I use:
typeof(Playwright).Assembly.GetType("Microsoft.Playwright.Core.AssertionsBase")!
.GetMethod("SetDefaultTimeout", BindingFlags.Static | BindingFlags.NonPublic)!
.Invoke(null, new object[] { _defaultTimeout });
in any static ctor which are always loaded
Thanks for workaround! I really don't understand why we can't set default timeout for Assertions. Something like Assertions.SetDefaultTimeout(...). Not everyone can use the .runsettings
FR https://github.com/microsoft/playwright-dotnet/issues/2259 also about this
Totally on the same page. Unless the workaround above is applied, Playwright makes pretty much obliges users to use runsettings file while configuration from code/custom config sources might be preferable to someone
Folding into #2259
Hello! as we spoke in this issue: https://github.com/microsoft/playwright/issues/23471
I would like to request for a posibility to set expect global timeout while we're setting up browser context, same as we have default timeout & default navigation timeout in screenshot below.