LDTP  2.3.1
generatemouseevent

Syntax

generatemouseevent(x, y [,'<options>'])

Description

Functionality of generatemouseevent, generates the default(left click) or specified mouse event in the given X and Y coordinates.

Note

This functionality depends on screen resolution / coordinates. Also the event will be generated on the currently focused window.

Options

b1c - Left button click

b2c - Middle button click

b3c - Right button click

b1d - Left button double click

b2d - Middle button double click

b3d - Right button double click

abs - absolute motion

rel - relative motion

b1p - Button 1 press

b1r - Button 1 release

b3p - Button 3 press

b3r - Button 3 release

ImplementationDetails

Used SPI_generateMouseEvent to generate the mouse events.

Return values
Returns1 on success, LdtpExecutionError exception will be thrown on failure

Refer: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/client-handler.c

Example

generatemouseevent(100, 200)

generatemouseevent(100, 200, "b1d") # Generate double click event

Author
Nagappan Alagappan nagap.nosp@m.pan@.nosp@m.gmail.nosp@m..com


Linux Desktop Testing Project