def tencent_login(method): ''' QQ login :param method: :return: ''' return AutomationHelper().tencent_login(method)
def double_touch_element(method, param): ''' 根据控件名称双击 :param method: :param param: elementname :return: ''' return AutomationHelper().double_touch_element(method, param)
def get_dumptree(method, timeout=10): ''' 获取控件元素 :param method: :param timeout: :return: ''' return AutomationHelper().get_dumptree(method, timeout)
def swip_screen(method, param): ''' 滑动操作 :param method: :param param: dict(fx=,fy,tx=,ty=,dragduration=) :return: ''' return AutomationHelper().swipe_screen(method, param)
def screen_shot(method, param): ''' 截图 :param method: :param param: 本地路径 :return: ''' return AutomationHelper().screen_shot(method, param)
def get_text(method, param): ''' 根据控件名称获取其内容 :param method: :param param: :return: ''' return AutomationHelper().get_element_text(method, param)
def wait_element(method, param, timeout=10): ''' 根据控件名称获取控件大小 :param method: :param param: :param timeout: :return: ''' return AutomationHelper().wait_element(method, param, timeout)
def long_press_element(method, param, duration=2): ''' 根据控件名称长按 :param method: :param param: elementname :param duration: 长按时长 :return: ''' return AutomationHelper().long_press_element(method, param, duration)
def swip_hold(method, param): ''' 滑动操作2.0 Written by davidzkpu :param method: :param param: dict(fx=,fy,tx=,ty=,dragduration=,holdduration=,velocity=) from coordinate(fx,fy) for dragduration time to coordinate (tx,ty) for holdduration time in velocity speedc :return: ''' return AutomationHelper().swipe_hold_screen(method, param)
def move_joystick(method, param): ''' 根据摇杆名称上下左右定向移动 Written by david move the joystick to controll the pawn :param method: :param param: dict :return: ''' return AutomationHelper().move_joystick(method, param)
def multi_fingers_swipe(method, params): ''' 多指滑动操作 :param method: :param params: param:array[dict(x1,y1,x2,y2,dur)......] 每个dict代表一个手指的滑动操作,多指通过多个dict表示 x1,y1为按压初始坐标,x2,y2为滑动终止坐标,dur为滑动时长(ms) :return: ''' return AutomationHelper().multifingers_swip(method, params)
def long_press_element(method, param, duration=2): return AutomationHelper().long_press_element(method, param, duration)
def double_touch_element(method, param): return AutomationHelper().double_touch_element(method, param)
def wait_element(method, param, timeout=10): return AutomationHelper().wait_element(method, param, timeout)
def touch_element(method, param): return AutomationHelper().touch_element(method, param)