ghost-cursor icon indicating copy to clipboard operation
ghost-cursor copied to clipboard

Overhaul documentation

Open Niek opened this issue 4 years ago • 4 comments

The README needs some updating to reflect the changes in the code recently:

  • Example of installMouseHelper
  • New function signature for createCursor
  • New function signature for move and click
  • Document moveTo and getRandomPagePoint

Anybody who's willing to check this?

Niek avatar Nov 13 '20 10:11 Niek

Sample TS code:

import * as puppeteer from 'puppeteer'
import { createCursor, getRandomPagePoint, installMouseHelper } from 'ghost-cursor'

(async () => {
  const browser = await puppeteer.launch()
  const page = await browser.newPage()
  const cursor = createCursor(page, await getRandomPagePoint(page), true)
  await installMouseHelper(page) // this shows the trace
  page.goto('https://www.example.com/')
  await cursor.click('element', { waitForClick: 10000, waitForSelector: 1000, paddingPercentage: 20 })
})()

Niek avatar Feb 17 '21 09:02 Niek

@Niek how can the speed of the mouse movement be set? Sometimes it goes too fast and I would like it to have some minimum Thank you for the great implementation!

Somberor avatar Apr 18 '21 18:04 Somberor

@Niek how can the speed of the mouse movement be set? Sometimes it goes too fast and I would like it to have some minimum Thank you for the great implementation!

This can be changed in the path() function - if you want to add speed customization, feel free to open a PR.

Niek avatar Apr 19 '21 06:04 Niek

I'd like to add an item to the list:

  • [ ] Document the fact that the cursor supports XPath

clouedoc avatar Dec 01 '21 13:12 clouedoc

I generated some docs with ChatGPT, wanna see what you'll think :)

TheGP avatar Feb 03 '24 07:02 TheGP

Fixed in #116

Niek avatar Feb 04 '24 15:02 Niek