airtest.core.android.recorder module

class Recorder(adb)[源代码]

基类:Yosemite

Screen recorder

start_recording(max_time=1800, bit_rate=None, bool_is_vertical='off')[源代码]

Start screen recording

参数:
  • max_time – maximum screen recording time, default is 1800

  • bit_rate – bit rate value, 450000-8000000, default is None(6000000)

抛出:

RuntimeError – if any error occurs while setup the recording

返回:

None if recording did not start, otherwise True

stop_recording(output='screen.mp4', is_interrupted=False)[源代码]

Stop screen recording

参数:
  • output – default file is screen.mp4

  • is_interrupted – True or False. Stop only, no pulling recorded file from device.

抛出:

AirtestError – if recording was not started before

返回:

None

pull_last_recording_file(output='screen.mp4')[源代码]

Pull the latest recording file from device. Error raises if no recording files on device.

参数:

output – default file is screen.mp4