docs: fix csharp type examples (#16888)

* docs: fix csharp type examples

* Apply suggestions from code review

Co-authored-by: Max Schmitt <max@schmitt.mx>

Co-authored-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
campersau 2022-08-29 11:54:02 +02:00 committed by GitHub
parent 1dcd756996
commit a10bd6a7c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -921,7 +921,7 @@ element_handle.type("world", delay=100) # types slower, like a user
```csharp ```csharp
await elementHandle.TypeAsync("Hello"); // Types instantly await elementHandle.TypeAsync("Hello"); // Types instantly
await elementHandle.TypeAsync("World", delay: 100); // Types slower, like a user await elementHandle.TypeAsync("World", new() { Delay = 100 }); // Types slower, like a user
``` ```
An example of typing into a text field and then submitting the form: An example of typing into a text field and then submitting the form:

View File

@ -1484,7 +1484,7 @@ frame.type("#mytextarea", "world", delay=100) # types slower, like a user
```csharp ```csharp
await frame.TypeAsync("#mytextarea", "hello"); // types instantly await frame.TypeAsync("#mytextarea", "hello"); // types instantly
await frame.TypeAsync("#mytextarea", "world", delay: 100); // types slower, like a user await frame.TypeAsync("#mytextarea", "world", new() { Delay = 100 }); // types slower, like a user
``` ```
### param: Frame.type.selector = %%-input-selector-%% ### param: Frame.type.selector = %%-input-selector-%%

View File

@ -984,7 +984,7 @@ element.type("world", delay=100) # types slower, like a user
```csharp ```csharp
await element.TypeAsync("Hello"); // Types instantly await element.TypeAsync("Hello"); // Types instantly
await element.TypeAsync("World", delay: 100); // Types slower, like a user await element.TypeAsync("World", new() { Delay = 100 }); // Types slower, like a user
``` ```
An example of typing into a text field and then submitting the form: An example of typing into a text field and then submitting the form:

View File

@ -3380,7 +3380,7 @@ page.type("#mytextarea", "world", delay=100) # types slower, like a user
```csharp ```csharp
await page.TypeAsync("#mytextarea", "hello"); // types instantly await page.TypeAsync("#mytextarea", "hello"); // types instantly
await page.TypeAsync("#mytextarea", "world"); // types slower, like a user await page.TypeAsync("#mytextarea", "world", new() { Delay = 100 }); // types slower, like a user
``` ```
Shortcut for main frame's [`method: Frame.type`]. Shortcut for main frame's [`method: Frame.type`].