traitsui.testing.tester.command module

This module defines interaction objects that can be passed to UIWrapper.perform where the actions represent ‘commands’.

Implementations for these actions are expected to produce the documented side effects without returning any values.

class traitsui.testing.tester.command.KeyClick(key)[source]

Bases: object

An object representing the user clicking a key on the keyboard.

Implementations should raise Disabled if the widget is disabled.

key

Standardized (pyface) name for a keyboard event. e.g. “Enter”, “Tab”, “Space”, “0”, “1”, “A”, …

Type:

str

class traitsui.testing.tester.command.KeySequence(sequence)[source]

Bases: object

An object representing the user typing a sequence of keys.

Implementations should raise Disabled if the widget is disabled.

sequence

A string that represents a sequence of key inputs. e.g. “Hello World”

Type:

str

class traitsui.testing.tester.command.MouseClick[source]

Bases: object

An object representing the user clicking a mouse button. Currently the left mouse button is assumed.

In most circumstances, a widget can still be clicked on even if it is disabled. Therefore unlike key events, if the widget is disabled, implementations should not raise an exception.

class traitsui.testing.tester.command.MouseDClick[source]

Bases: object

An object representing the user double clicking a mouse button. Currently the left mouse button is assumed.

In most circumstances, a widget can still be clicked on even if it is disabled. Therefore unlike key events, if the widget is disabled, implementations should not raise an exception.