Update trace-viewer-intro-csharp.md

This commit is contained in:
Max Schmitt 2024-05-08 19:53:56 +01:00 committed by GitHub
parent 1b4f8b2c4a
commit b1102feccb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,6 +142,13 @@ pwsh bin/Debug/net8.0/playwright.ps1 show-trace bin/Debug/net8.0/playwright-trac
<TabItem value="nunit"> <TabItem value="nunit">
```csharp ```csharp
namespace PlaywrightTests;
[Parallelizable(ParallelScope.Self)]
[TestFixture]
public class ExampleTest : PageTest
{
// ...
[TearDown] [TearDown]
public async Task TearDown() public async Task TearDown()
{ {
@ -157,12 +164,22 @@ pwsh bin/Debug/net8.0/playwright.ps1 show-trace bin/Debug/net8.0/playwright-trac
) : null, ) : null,
}); });
} }
}
``` ```
</TabItem> </TabItem>
<TabItem value="mstest"> <TabItem value="mstest">
```csharp ```csharp
using System.Text.RegularExpressions;
using Microsoft.Playwright;
using Microsoft.Playwright.MSTest;
namespace PlaywrightTests;
[TestClass]
public class ExampleTest : PageTest
// ...
[TestCleanup] [TestCleanup]
public async Task TestCleanup() public async Task TestCleanup()
{ {
@ -177,7 +194,7 @@ pwsh bin/Debug/net8.0/playwright.ps1 show-trace bin/Debug/net8.0/playwright-trac
) : null ) : null
}); });
} }
}
``` ```
</TabItem> </TabItem>