chore: implement Webdriver BiDi mouse and touchscreen (#10402)

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
This commit is contained in:
jrandolf
2023-06-19 13:26:30 +02:00
committed by GitHub
parent 4b49212f24
commit 4f6b0d4e45
17 changed files with 869 additions and 192 deletions

View File

@@ -13,20 +13,18 @@ class Frame {
type(
selector: string,
text: string,
options?: {
delay: number;
}
options?: Readonly<TypeOptions>
): Promise<void>;
}
```
## Parameters
| Parameter | Type | Description |
| --------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| selector | string | the selector for the element to type into. If there are multiple the first will be used. |
| text | string | text to type into the element |
| options | { delay: number; } | _(Optional)_ takes one option, <code>delay</code>, which sets the time to wait between key presses in milliseconds. Defaults to <code>0</code>. |
| Parameter | Type | Description |
| --------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| selector | string | the selector for the element to type into. If there are multiple the first will be used. |
| text | string | text to type into the element |
| options | Readonly&lt;[TypeOptions](./puppeteer.typeoptions.md)&gt; | _(Optional)_ takes one option, <code>delay</code>, which sets the time to wait between key presses in milliseconds. Defaults to <code>0</code>. |
**Returns:**

View File

@@ -15,20 +15,18 @@ class Page {
type(
selector: string,
text: string,
options?: {
delay: number;
}
options?: Readonly<TypeOptions>
): Promise<void>;
}
```
## Parameters
| Parameter | Type | Description |
| --------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| selector | string | A [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) of an element to type into. If there are multiple elements satisfying the selector, the first will be used. |
| text | string | A text to type into a focused element. |
| options | { delay: number; } | _(Optional)_ have property <code>delay</code> which is the Time to wait between key presses in milliseconds. Defaults to <code>0</code>. |
| Parameter | Type | Description |
| --------- | --------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| selector | string | A [selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors) of an element to type into. If there are multiple elements satisfying the selector, the first will be used. |
| text | string | A text to type into a focused element. |
| options | Readonly&lt;[TypeOptions](./puppeteer.typeoptions.md)&gt; | _(Optional)_ have property <code>delay</code> which is the Time to wait between key presses in milliseconds. Defaults to <code>0</code>. |
**Returns:**