reaz1995 / ghost-cursor-playwright Goto Github PK
View Code? Open in Web Editor NEWModification of actual ghost-cursor for puppeteer, with more functionality and rewrited to work well with playwight.
Modification of actual ghost-cursor for puppeteer, with more functionality and rewrited to work well with playwight.
the rest of code is executed without waiting for cursor movements to be triggered in the control flow
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
page.evaluate: TypeError: Failed to set the 'innerHTML' property on 'Element': This document requires 'TrustedHTML' assignment.
at eval (eval at evaluate (:226:30), <anonymous>:4:36)
at UtilityScript.evaluate (<anonymous>:228:17)
at UtilityScript.<anonymous> (<anonymous>:1:44)
at Page.<anonymous> (E:\Projects\Personal\botting\top-results-mon\node_modules\ghost-cursor-playwright\lib\mouse-helper.js:5:20)
Node.js v20.9.0
I need to sign in to Google but it fails to inject the cursor on Google's sign in page and raises this error. Worked fine on pages before this like Google Search.
How to handle iframe?
Hey there @reaz1995, thanks for the development effort first of all.
Isn't the cursor on the Page supposed to move with a relatively slow speed with a curve path, and slow down before it reaches the target, as a human would do?
When I execute page.cursor.actions.move(locatorName)
I don't see a trajectory at all, I just see the cursor immediately teleporting to the selected element as if my screen is a touch device rather than a desktop with a mouse and a human just tapped it in the right place with a finger.
Do I need to set an additional option to move
or something?
I has an issue when i using to click a button in google.com
page.evaluate
: TypeError: Failed to set the 'innerHTML' property on 'Elem
ent': This document requires 'TrustedHTML' assignment.
[1] at eval (eval at evaluate (:201:30), :4:3
6)
[1] at UtilityScript.evaluate (:203:17)
[1] at UtilityScript. (:1:44)
[1] at Page. (...\node_modules\ghost-cursor-playwright\lib\mouse-helper.js:5:20)
Hi @reaz1995 - great work! this is exactly what I need, but how would I make it work with c#?
const playwright = require('playwright')
const createCursor = require('ghost-cursor-playwright');
let browser = await playwright.firefox.launch({
headless: false
});
const context = await browser.newContext(
{
}
);
const page = await context.newPage();
const cursor = await createCursor(page);
Issue: createCursor is not a function when trying to use this package. Any idea why I am getting this error?
Because || is used to default debug to true on line 24 of cursor.ts, it can never be set to false. Using ?? instead will resolve this. Similarly overshootSpread and overshootRadius can never be set to 0.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.