# puppeteer-mouse-helper

> A mouse helper for Puppeteer

Latest version **1.0.2** (published 2023-11-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install puppeteer-mouse-helper
pnpm add puppeteer-mouse-helper
yarn add puppeteer-mouse-helper
bun add puppeteer-mouse-helper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-18 |
| First published | 2023-11-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | gh05d |
| Maintainers | gh05d |
| Keywords | puppeteer, mouse, mouse-helper, javascript |

## Links

- npm: https://www.npmjs.com/package/puppeteer-mouse-helper
- Repository: https://github.com/Gh05d/puppeteer-mouse-helper
- Homepage: https://github.com/Gh05d/puppeteer-mouse-helper#readme
- Issues: https://github.com/Gh05d/puppeteer-mouse-helper/issues
- npm.io page: https://npm.io/package/puppeteer-mouse-helper

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2023-11-18
- 1.0.1 — 2023-11-18
- 1.0.0 — 2023-11-18

## README

## Documentation

### `installMouseHelper(page, backgroundImage, styles)`

Installs a visible mouse pointer in the Puppeteer page, enhancing the visualization of mouse movements and interactions during automated testing.

#### Parameters

- `page` (Object): The Puppeteer page object where the mouse helper will be installed.
- `backgroundImage` (String, optional): URL for a custom cursor image. If not provided, a default cursor image will be used.
- `styles` (String, optional): CSS styles to customize properties like width and height. Default values are 30px for both width and height.

#### Returns

This function does not return a value. It modifies the provided Puppeteer page by injecting a custom mouse pointer for visualization.

#### Example

```javascript
const puppeteer = require("puppeteer");
const installMouseHelper = require("puppeteer-mouse-helper");

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();

  // Install the mouse helper with custom cursor and styles
  await installMouseHelper(
    page,
    "your-cursor-url",
    "width: 50px; height: 50px;"
  );

  // Now the page will show a custom mouse pointer for better visualization during tests.

  // Your testing code goes here

  await browser.close();
})();
```

---
_Source: https://npm.io/package/puppeteer-mouse-helper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
