Hid

A Robot Framework library for interacting with virtual Wayland-based HIDs.

The client connects to the display upon entering the first keyword, and disconnects when the library goes out of scope.

If WAYLAND_DISPLAY is not defined, it defaults to 'wayland-0'.

Attributes: ROBOT_LISTENER_API_VERSION: Robot listener API version

  • Type: LIBRARY

  • Scope: TEST

Keywords

Click Pointer Button

Click pointer button.

Return

None

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

button

string

POSITIONAL_OR_NAMED

Yes

one of LEFT, MIDDLE, RIGHT

Example

Click Pointer Button    LEFT

Keys Combo

Press and release a combination of keys.

Return

None

Raises

  • AssertionError: If both combo and keys are provided.

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

combo

None

POSITIONAL_OR_NAMED

Yes

first key, or a list of keys to press at the same time.

keys

string

VAR_POSITIONAL

No

remaining keys to press.

Example

Keys Combo    Control_L    Alt_L    Delete
${combo}=    Create List    Control_L    c
Keys Combo    ${combo}

Move Pointer To Absolute

Move the virtual pointer to an absolute position within the output.

Return

None

Raises

  • AssertionError: if coordinates are out of range

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

x

integer

POSITIONAL_OR_NAMED

Yes

horizontal coordinate, 0 <= x <= screen width

y

integer

POSITIONAL_OR_NAMED

Yes

vertical coordinate, 0 <= y <= screen height

Example

Move Pointer To Absolute    ${640}    ${480}

Move Pointer To Proportional

Move the virtual pointer to a position proportional to the size of the output.

Return

None

Raises

  • AssertionError: if coordinates are out of range

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

x

float

POSITIONAL_OR_NAMED

Yes

horizontal coordinate, 0 <= x <= 1

y

float

POSITIONAL_OR_NAMED

Yes

vertical coordinate, 0 <= y <= 1

Example

Move Pointer To Proportional    0.5    0.5

Press Pointer Button

Press pointer button.

Return

None

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

button

string

POSITIONAL_OR_NAMED

Yes

one of LEFT, MIDDLE, RIGHT

Example

Press Pointer Button    LEFT

Release Pointer Button

Release pointer button.

Return

None

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

button

string

POSITIONAL_OR_NAMED

Yes

one of LEFT, MIDDLE, RIGHT

Example

Release Pointer Button    LEFT

Release Pointer Buttons

Release all pointer buttons.

Return

None

Example

Release Pointer Buttons

Type String

Type a string.

Return

None

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

string

string

POSITIONAL_OR_NAMED

Yes

string to type.

Example

Type String    hello world

Walk Pointer To Absolute

Walk the virtual pointer to an absolute position within the output, maximum step_distance at a time, with delay seconds in between.

Return

None

Raises

  • AssertionError: if coordinates are out of range or if x and y are not integers

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

x

integer

POSITIONAL_OR_NAMED

Yes

horizontal coordinate, 0 <= x <= screen width

y

integer

POSITIONAL_OR_NAMED

Yes

vertical coordinate, 0 <= y <= screen height

step_distance

float

POSITIONAL_OR_NAMED

Yes

maximum distance to move per step

delay

float

POSITIONAL_OR_NAMED

Yes

delay between steps in seconds

Example

Walk Pointer To Absolute    ${640}    ${480}    ${10}    ${0.01}

Walk Pointer To Proportional

Walk the virtual pointer to a position proportional to the size of the output, maximum step_distance at a time, with delay seconds in between.

Return

None

Raises

  • AssertionError: if coordinates are out of range

Positional and named arguments

Name

Type

Default Value

Kind

Required

Documentation

x

float

POSITIONAL_OR_NAMED

Yes

horizontal coordinate, 0 <= x <= 1

y

float

POSITIONAL_OR_NAMED

Yes

vertical coordinate, 0 <= y <= 1

step_distance

float

POSITIONAL_OR_NAMED

Yes

maximum distance to move per step horizontally, 0 < step_distance <= 1

delay

float

POSITIONAL_OR_NAMED

Yes

delay between steps in seconds

Example

Walk Pointer To Proportional    0.5    0.5    0.05    ${0.01}