autopilot.display.Display
- class autopilot.display.Display
The base class/inteface for the display devices.
- static create(preferred_backend='')
Get an instance of the Display class.
For more infomration on picking specific backends, see Advanced Backend Picking
Parameters: preferred_backend – A string containing a hint as to which backend you would like.
possible backends are:
- X11 - Get display information from X11.
- UPA - Get display information from the ubuntu platform API.
Raises: RuntimeError if autopilot cannot instantate any of the possible backends. Raises: RuntimeError if the preferred_backend is specified and is not one of the possible backends for this device class. Raises: BackendException if the preferred_backend is set, but that backend could not be instantiated. Returns: Instance of Display with appropriate backend.
- autopilot.display.get_screenshot_data(display_type)
Return a BytesIO object of the png data for the screenshot image.
- display_type is the display server type. supported values are:
- “X11”
- “MIR”
Raises: - RuntimeError – If attempting to capture an image on an unsupported display server.
- RuntimeError – If saving image data to file-object fails.