Im currently trying to find the position of my mouse when testing in Cypress. I'm trying to work with WebGL models and since I can't grab those individually to be able to grab the model and move them around I was thinking of using the page coordinates/mouse position so its close enough.
I had found a closed issue on Cypress' github about this, but it wouldn't install so if any of you know why it's throwing the attached error or an easier way to find out what the position is let me know! It will be greatly appreciated.
Cypress closed issue | Mouse position
(sorry for the bad pen marking; trying to scribble out my last name) I ran the code given in the closed issue which was:
npm i -D cypress-mouse-position
then added these in the two files:
cypress/plugins/index.js
module.exports = (on, config) => {
# ...
initCypressMousePositionPlugin(on);
# ...
}
cypress/support/index.js
import 'cypress-mouse-position/commands';
It looks like the author of cypress-mouse-position
never actually published his package to NPM, so I've done it for him.
You should now be able to do npm i -D cypress-mouse-position
without encountering any errors, since it is now published on NPM.