
from appiumConfigure import find_element
from appium.webdriver.common.touch_action import TouchAction

def swip_method(driver,eleshang,elexia,):

    ele_shang = find_element.element(driver, eleshang)
    ele_xia = find_element.element(driver, elexia)
    # 滑动
    TouchAction(driver).press(ele_xia).wait(1000).move_to(ele_shang).release().perform()



# def swip_method_new(driver, new_list):
#     for i in new_list:
#         for k,v in i.items():
#             ele_shang = find_element.element(driver, k)
#             ele_xia = find_element.element(driver, v)
#             # 滑动
#             TouchAction(driver).press(ele_xia).wait(1000).move_to(ele_shang).release().perform()


