I first began looking at LDTP, but found that the raw mouse events were limited to click and double-clicking left and right buttons. I needed something more flexible to support swiping the Android Emulator.
What I found was 'xdotool' which seems to hit all the marks; activating a window, depressing either mouse button, moving the mouse, and releasing the button(s). Introducting a delay between mouse down and up allows for long press events.
e.g.
$ xdotool windowactivate `exec xdotool search --title 5554:myAvd`
$ xdotool mouse move 100 100
$ xdotool mousedown 1
$ xdotool mouse move 200 200
$ xdotool mouseup 1
Cheers.
No comments:
Post a Comment