mirror of
https://github.com/microsoft/playwright.git
synced 2024-08-17 16:10:29 +03:00
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
|
||||
- `x` <[float]>
|
||||
|
||||
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### param: Mouse.click.y
|
||||
* since: v1.8
|
||||
- `y` <[float]>
|
||||
|
||||
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### option: Mouse.click.button = %%-input-button-%%
|
||||
* since: v1.8
|
||||
|
||||
@ -93,10 +97,14 @@ Shortcut for [`method: Mouse.move`], [`method: Mouse.down`], [`method: Mouse.up`
|
||||
* since: v1.8
|
||||
- `x` <[float]>
|
||||
|
||||
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### param: Mouse.dblclick.y
|
||||
* since: v1.8
|
||||
- `y` <[float]>
|
||||
|
||||
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### option: Mouse.dblclick.button = %%-input-button-%%
|
||||
* since: v1.8
|
||||
|
||||
@ -123,10 +131,14 @@ Dispatches a `mousemove` event.
|
||||
* since: v1.8
|
||||
- `x` <[float]>
|
||||
|
||||
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### param: Mouse.move.y
|
||||
* since: v1.8
|
||||
- `y` <[float]>
|
||||
|
||||
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### option: Mouse.move.steps
|
||||
* since: v1.8
|
||||
- `steps` <[int]>
|
||||
|
@ -17,10 +17,14 @@ Dispatches a `touchstart` and `touchend` event with a single touch at the positi
|
||||
* since: v1.8
|
||||
- `x` <[float]>
|
||||
|
||||
X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
### param: Touchscreen.tap.y
|
||||
* since: v1.8
|
||||
- `y` <[float]>
|
||||
|
||||
Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
|
||||
## async method: Touchscreen.touch
|
||||
* 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),
|
||||
* [mouse.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down),
|
||||
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
|
||||
* @param x
|
||||
* @param y
|
||||
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param 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.down([options])](https://playwright.dev/docs/api/class-mouse#mouse-down) and
|
||||
* [mouse.up([options])](https://playwright.dev/docs/api/class-mouse#mouse-up).
|
||||
* @param x
|
||||
* @param y
|
||||
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param options
|
||||
*/
|
||||
dblclick(x: number, y: number, options?: {
|
||||
@ -18768,8 +18768,8 @@ export interface Mouse {
|
||||
|
||||
/**
|
||||
* Dispatches a `mousemove` event.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param 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
|
||||
* if `hasTouch` option of the browser context is false.
|
||||
* @param x
|
||||
* @param y
|
||||
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
|
||||
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
|
||||
*/
|
||||
tap(x: number, y: number): Promise<void>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user