autopilot.input

Autopilot unified input system.

This package provides input methods for various platforms. Autopilot aims to provide an appropriate implementation for the currently running system. For example, not all systems have an X11 stack running: on those systems, autopilot will instantiate input classes class that use something other than X11 to generate events (possibly UInput).

Test authors should instantiate the appropriate class using the create method on each class. Calling create() with no arguments will get an instance of the specified class that suits the current platform. In this case, autopilot will do it’s best to pick a suitable backend. Calling create with a backend name will result in that specific backend type being returned, or, if it cannot be created, an exception will be raised. For more information on creating backends, see Advanced Backend Picking

There are three basic input types available:

  • Keyboard - traditional keyboard devices.

  • Mouse - traditional mouse devices (Currently only avaialble on the

    desktop).

  • Touch - single point-of-contact touch device.

  • The Pointer class is a wrapper that unifies the API of the Mouse and Touch classes, which can be helpful if you want to write a test that can use either a mouse of a touch device. A common pattern is to use a Touch device when running on a mobile device, and a Mouse device when running on a desktop.

    See also

    Module autopilot.gestures
    Multitouch and gesture support for touch devices.

    Elements

    Keyboard
    A simple keyboard device class.
    Mouse
    A simple mouse device class.
    Pointer
    A wrapper class that represents a pointing device which can either
    Touch
    A simple touch driver class.