Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

chrome extension force mouse move

I am writing a chrome extension that records your actions like ( mouse click, keyboard keyup ). The idea of the extension is to help me and my colleagues to reduce the boring testing of our web based project. I made it to record the events and store it on the dev server as mysql so i can use or share to them. But the problem is replaying the saved actions.

So how if there is a way to force mouse move, mouse click events. Can it be done from flash,java or something like that.

PS. The project is Extjs but i want to make the extension useful for developer using other frameworks and publish it.

like image 221
mraiur Avatar asked Jun 11 '12 08:06

mraiur


People also ask

Is there a mouse jiggler app?

Simulate the movement of your mouse cursorMouse Jiggler is an interesting application with which you can avoid, for example, having your screen saver frequently turn on and off.

How do I enable mouse gestures in Chrome?

Setting up Mouse Gestures in Chrome You need to install the 'CrxMouse Chrome Gestures' Chrome extension to set mouse gestures in the browser. Go to chrome.google.com/webstore and search for 'CrxMouse Chrome Gestures' extension, OR use this link to open the extension page directly in the Chrome Web Store.

What is move mouse EXE?

Move Mouse is a utility tool that simulates activity on your computer. With its help, you can keep your PC in an active state, even when you're not around. The easy-to-use program prevents your screen from going dim and is suitable for giving presentations and keeping remote sessions active.


2 Answers

Consider using Selenium for this. It has support for many languages, and you can script your whole test with it. You can for example set it to click on an element, wait for something to happen or fill text boxes.

like image 88
Veda Avatar answered Sep 21 '22 04:09

Veda


Imagine some random website controlling your mouse ... not cool, is it? (That's why you cant force mousemove via javascript)

However, you can trigger clicks on elements. To achieve that, you need to save the event(mouse-over|out/(dbl)click/whatever) and the according element (in the eventfunction: this). That should be sufficient to simulate theworkflow.

jQuery-Example:

$('#item').click();
$('#item').trigger('click');

vanilla javascript:

document.querySelector("#item").click();
like image 28
Christoph Avatar answered Sep 19 '22 04:09

Christoph