new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · API reference · all subjects

mouse

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Mouse class overview

The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Every page object has its own Mouse, accessible with the Page.mouse property. Mouse was added in v1.8.

Mouse tracing example

Example showing how to use page.mouse to trace a 100x100 square: ```js 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(); ```

Mouse tracing example Python async

Example showing how to use page.mouse to trace a 100x100 square in Python async: ```python 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() ```

Mouse debugging with Trace viewer

When debugging mouse movement, 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.

Give your agent this brain