airtest.core.android.cap_methods.base_cap module

class BaseCap(adb, *args, **kwargs)[source]

Bases: object

Base class for all screenshot methods 所有屏幕截图方法的基类

get_frame_from_stream()[source]

Get a frame of the current screen from the mobile screen stream

从手机画面流中,获取一张当前屏幕截图

Returns: frame_data

get_frame()[source]
teardown_stream()[source]
snapshot(ensure_orientation=True, *args, **kwargs)[source]

Take a screenshot and convert it into a cv2 image object

获取一张屏幕截图,并转化成cv2的图像对象

Returns: numpy.ndarray