Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(dotnet): fixed broken code snippets which contained Java (#7260)

Martin Costelloaf18b314730f
diff --git a/docs/src/cheat-sheet.md b/docs/src/cheat-sheet.md
index 1d2705d626..6468ebae32 100644
--- a/docs/src/cheat-sheet.md
+++ b/docs/src/cheat-sheet.md
@@ -126,7 +126,7 @@ await page.SetInputFilesAsync("input#upload", new FilePayload
{
Name = "file.txt",
MimeType = "text/plain",
- Buffer = "this is a test".getBytes(StandardCharsets.UTF_8),
+ Buffer = System.Text.Encoding.UTF8.GetBytes("this is a test"),
});
```
diff --git a/docs/src/input.md b/docs/src/input.md
index 0688951593..4edff73b49 100644
--- a/docs/src/input.md
+++ b/docs/src/input.md
@@ -713,7 +713,7 @@ await page.SetInputFilesAsync("input#upload", new FilePayload
{
Name = "file.txt",
MimeType = "text/plain",
- Buffer = "this is a test".getBytes(StandardCharsets.UTF_8),
+ Buffer = System.Text.Encoding.UTF8.GetBytes("this is a test"),
});
```