docs: make x/y more clear (#31606)
Fixes https://github.com/microsoft/playwright/issues/31567
This commit is contained in:
parent
1ea55acab3
commit
5c8fe5c33c
|
|
@ -68,10 +68,14 @@ Shortcut for [`method: Mouse.move`], [`method: Mouse.down`], [`method: Mouse.up`
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `x` <[float]>
|
- `x` <[float]>
|
||||||
|
|
||||||
|
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### param: Mouse.click.y
|
### param: Mouse.click.y
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `y` <[float]>
|
- `y` <[float]>
|
||||||
|
|
||||||
|
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### option: Mouse.click.button = %%-input-button-%%
|
### option: Mouse.click.button = %%-input-button-%%
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
|
|
||||||
|
|
@ -93,10 +97,14 @@ Shortcut for [`method: Mouse.move`], [`method: Mouse.down`], [`method: Mouse.up`
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `x` <[float]>
|
- `x` <[float]>
|
||||||
|
|
||||||
|
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### param: Mouse.dblclick.y
|
### param: Mouse.dblclick.y
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `y` <[float]>
|
- `y` <[float]>
|
||||||
|
|
||||||
|
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### option: Mouse.dblclick.button = %%-input-button-%%
|
### option: Mouse.dblclick.button = %%-input-button-%%
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
|
|
||||||
|
|
@ -123,10 +131,14 @@ Dispatches a `mousemove` event.
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `x` <[float]>
|
- `x` <[float]>
|
||||||
|
|
||||||
|
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### param: Mouse.move.y
|
### param: Mouse.move.y
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `y` <[float]>
|
- `y` <[float]>
|
||||||
|
|
||||||
|
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### option: Mouse.move.steps
|
### option: Mouse.move.steps
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `steps` <[int]>
|
- `steps` <[int]>
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,14 @@ Dispatches a `touchstart` and `touchend` event with a single touch at the positi
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `x` <[float]>
|
- `x` <[float]>
|
||||||
|
|
||||||
|
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
### param: Touchscreen.tap.y
|
### param: Touchscreen.tap.y
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
- `y` <[float]>
|
- `y` <[float]>
|
||||||
|
|
||||||
|
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
|
|
||||||
## async method: Touchscreen.touch
|
## async method: Touchscreen.touch
|
||||||
* since: v1.46
|
* since: v1.46
|
||||||
|
|
||||||
|
|
|
||||||
16
packages/playwright-core/types/types.d.ts
vendored
16
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -18707,8 +18707,8 @@ export interface Mouse {
|
||||||
* Shortcut for [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move),
|
* Shortcut for [mouse.move(x, y[, options])](https://playwright.dev/docs/api/class-mouse#mouse-move),
|
||||||
* [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
|
* [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
|
||||||
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
|
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
|
||||||
* @param x
|
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param y
|
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
click(x: number, y: number, options?: {
|
click(x: number, y: number, options?: {
|
||||||
|
|
@ -18734,8 +18734,8 @@ export interface Mouse {
|
||||||
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up),
|
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up),
|
||||||
* [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down) and
|
* [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down) and
|
||||||
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
|
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
|
||||||
* @param x
|
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param y
|
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
dblclick(x: number, y: number, options?: {
|
dblclick(x: number, y: number, options?: {
|
||||||
|
|
@ -18768,8 +18768,8 @@ export interface Mouse {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dispatches a `mousemove` event.
|
* Dispatches a `mousemove` event.
|
||||||
* @param x
|
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param y
|
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
move(x: number, y: number, options?: {
|
move(x: number, y: number, options?: {
|
||||||
|
|
@ -19678,8 +19678,8 @@ export interface Touchscreen {
|
||||||
*
|
*
|
||||||
* **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
|
* **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
|
||||||
* if `hasTouch` option of the browser context is false.
|
* if `hasTouch` option of the browser context is false.
|
||||||
* @param x
|
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
* @param y
|
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||||
*/
|
*/
|
||||||
tap(x: number, y: number): Promise<void>;
|
tap(x: number, y: number): Promise<void>;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue