poco.sdk.interfaces.screen module

class ScreenInterface[source]

Bases: object

This is one of the main communication interfaces. This interface ensures the ability for accessing the rendering the results presented on screen of target device. Note that rendering results are very often not used in automated testing directly. Following methods definitions can assist to obtain the information about the app.

getPortSize()[source]

Get the real resolution of the screen in pixels.

Returns:

width and height in pixels

Return type:

2-list (float, float)

getScreen(width)[source]

Take the screenshot of the target device screen or target app’s window

Parameters:

width (int) – expected width of the screenshot in pixels

Returns:

  • b64img: base64 encoded screen data

  • format: screen data format (png/jpg/etc.)

Return type:

2-list (str, str)