Closed Niek closed 9 months ago
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 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!
@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.
I'd like to add an item to the list:
I generated some docs with ChatGPT, wanna see what you'll think :)
Fixed in #116
The README needs some updating to reflect the changes in the code recently:
installMouseHelper
createCursor
move
andclick
moveTo
andgetRandomPagePoint
Anybody who's willing to check this?