Пример #1
0
def tencent_login(method):
    '''
    QQ login
    :param method:
    :return:
    '''
    return AutomationHelper().tencent_login(method)
Пример #2
0
def double_touch_element(method, param):
    '''
    根据控件名称双击
    :param method:
    :param param: elementname
    :return:
    '''
    return AutomationHelper().double_touch_element(method, param)
Пример #3
0
def get_dumptree(method, timeout=10):
    '''
    获取控件元素
    :param method:
    :param timeout:
    :return:
    '''
    return AutomationHelper().get_dumptree(method, timeout)
Пример #4
0
def swip_screen(method, param):
    '''
    滑动操作
    :param method:
    :param param: dict(fx=,fy,tx=,ty=,dragduration=)
    :return:
    '''
    return AutomationHelper().swipe_screen(method, param)
Пример #5
0
def screen_shot(method, param):
    '''
    截图
    :param method:
    :param param: 本地路径
    :return:
    '''
    return AutomationHelper().screen_shot(method, param)
Пример #6
0
def get_text(method, param):
    '''
    根据控件名称获取其内容
    :param method:
    :param param:
    :return:
    '''
    return AutomationHelper().get_element_text(method, param)
Пример #7
0
def wait_element(method, param, timeout=10):
    '''
    根据控件名称获取控件大小
    :param method:
    :param param:
    :param timeout:
    :return:
    '''
    return AutomationHelper().wait_element(method, param, timeout)
Пример #8
0
def long_press_element(method, param, duration=2):
    '''
    根据控件名称长按
    :param method:
    :param param: elementname
    :param duration: 长按时长
    :return:
    '''
    return AutomationHelper().long_press_element(method, param, duration)
Пример #9
0
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)
Пример #10
0
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)
Пример #11
0
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)
Пример #12
0
def long_press_element(method, param, duration=2):
    return AutomationHelper().long_press_element(method, param, duration)
Пример #13
0
def double_touch_element(method, param):
    return AutomationHelper().double_touch_element(method, param)
Пример #14
0
def wait_element(method, param, timeout=10):
    return AutomationHelper().wait_element(method, param, timeout)
Пример #15
0
def touch_element(method, param):
    return AutomationHelper().touch_element(method, param)