Skip to content

A simple server that is able to execute mouse and keyboard actions on the host.

Notifications You must be signed in to change notification settings

sascha10000/native-hw-action-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

native-hw-action-server

A simple server that can be commanded to perform various mouse actions. It was built as a last resort to execute mouse actions for e2e tests with cypress, as the events would not work on the target application.

Usage

Start the server with cargo run or build and run the binary. The server will listen on port 8080 by default. Parameters are optional.

cargo run -- --port 8080 --ip 127.0.0.1

Endpoint

The server has a single endpoint that accepts POST requests. The endpoint is /action and the request body should be a JSON object with the following structure:

POST /mouse-actions

{
  actions: [
    { MouseMove: [start.x, start.y] },
    { MouseDown: 'Left' },
    { MouseMove: [end.x, end.y] },
    { MouseUp: 'Left' },
  ],
  delay_between: 1000,
}

The actions array can contain any number of actions, and the delay_between parameter is optional. It will add a delay between each action in the array.

About

A simple server that is able to execute mouse and keyboard actions on the host.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages