fast_device.py 499 B

123456789101112131415
  1. # This Python file uses the following encoding: utf-8
  2. # @author runhey
  3. # github https://github.com/runhey
  4. from tasks.base_task import BaseTask
  5. from tasks.Script.config_device import ScreenshotMethod, ControlMethod
  6. class FastDevice(BaseTask):
  7. def fast_screenshot(self):
  8. if self.config.model.script.device.screenshot_method != ScreenshotMethod.WINDOW_BACKGROUND:
  9. raise
  10. self.device.image = self.device.screenshot_window_background()
  11. return self.device.image