mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
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:
parent
1dcd756996
commit
a10bd6a7c6
@ -921,7 +921,7 @@ element_handle.type("world", delay=100) # types slower, like a user
|
||||
|
||||
```csharp
|
||||
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:
|
||||
|
@ -1484,7 +1484,7 @@ frame.type("#mytextarea", "world", delay=100) # types slower, like a user
|
||||
|
||||
```csharp
|
||||
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-%%
|
||||
|
@ -984,7 +984,7 @@ element.type("world", delay=100) # types slower, like a user
|
||||
|
||||
```csharp
|
||||
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:
|
||||
|
@ -3380,7 +3380,7 @@ page.type("#mytextarea", "world", delay=100) # types slower, like a user
|
||||
|
||||
```csharp
|
||||
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`].
|
||||
|
Loading…
x
Reference in New Issue
Block a user