poco.acceleration module

class PocoAccelerationMixin[源代码]

基类:object

This class provides some high-level method to reduce redundant code implementations. As this is a MixinClass, please do not introduce new state in methods.

dismiss(targets, exit_when=None, sleep_interval=0.5, appearance_timeout=20, timeout=120)[源代码]

Automatically dismiss the target objects

参数:
  • targets (list) – list of poco objects to be dropped
  • exit_when – termination condition, default is None which means to automatically exit when list of targets is empty
  • sleep_interval – time interval between each actions for the given targets, default is 0.5s
  • appearance_timeout – time interval to wait for given target to appear on the screen, automatically exit when timeout, default is 20s
  • timeout – dismiss function timeout, default is 120s
Raises:

PocoTargetTimeout – when dismiss time interval timeout, under normal circumstances, this should not happen and if happens, it will be reported