Hid¶
Provides robot interface for HID interactions with a VM with a running VNC server.
Attributes: type_string_delay: Time between keypresses when typing a string.
Type: LIBRARY
Scope: TEST
Keywords¶
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¶
Move the pointer to specified coordinates (absolute, not relative)
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 |
X co-ordinate to move pointer to |
|
y |
float |
POSITIONAL_OR_NAMED |
Yes |
Y co-ordinate to move pointer to |
Example¶
Move Pointer 0.5 0.5
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
Scroll Pointer Wheel¶
Scroll the pointer wheel at the current pointer position.
Return¶
None
Positional and named arguments¶
Name |
Type |
Default Value |
Kind |
Required |
Documentation |
|---|---|---|---|---|---|
steps |
integer |
POSITIONAL_OR_NAMED |
Yes |
number of wheel steps; positive scrolls down, negative scrolls up. |
Example¶
Scroll Pointer Wheel 5
Scroll Pointer Wheel -3
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}