A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://playwright.dev/python/docs/api/class-mouse below:

Mouse | Playwright Python

Mouse

The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.

tip

If you want to debug where the mouse moved, you can use the Trace viewer or Playwright Inspector. A red dot showing the location of the mouse will be shown for every mouse action.

Every page object has its own Mouse, accessible with page.mouse.


page.mouse.move(0, 0)
page.mouse.down()
page.mouse.move(0, 100)
page.mouse.move(100, 100)
page.mouse.move(100, 0)
page.mouse.move(0, 0)
page.mouse.up()

await page.mouse.move(0, 0)
await page.mouse.down()
await page.mouse.move(0, 100)
await page.mouse.move(100, 100)
await page.mouse.move(100, 0)
await page.mouse.move(0, 0)
await page.mouse.up()
Methods clickAdded before v1.9 mouse.click

Shortcut for mouse.move(), mouse.down(), mouse.up().

Usage

mouse.click(x, y)
mouse.click(x, y, **kwargs)

Arguments

Returns

dblclickAdded before v1.9 mouse.dblclick

Shortcut for mouse.move(), mouse.down(), mouse.up(), mouse.down() and mouse.up().

Usage

mouse.dblclick(x, y)
mouse.dblclick(x, y, **kwargs)

Arguments

Returns

downAdded before v1.9 mouse.down

Dispatches a mousedown event.

Usage

mouse.down()
mouse.down(**kwargs)

Arguments

Returns

moveAdded before v1.9 mouse.move

Dispatches a mousemove event.

Usage

mouse.move(x, y)
mouse.move(x, y, **kwargs)

Arguments

Returns

upAdded before v1.9 mouse.up

Dispatches a mouseup event.

Usage

mouse.up()
mouse.up(**kwargs)

Arguments

Returns

wheelAdded in: v1.15 mouse.wheel

Dispatches a wheel event. This method is usually used to manually scroll the page. See scrolling for alternative ways to scroll.

note

Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling to finish before returning.

Usage

mouse.wheel(delta_x, delta_y)

Arguments

Returns


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4