airtestIDE swipe向上滑动
__author__ = "Administrator"
from airtest.core.api import *
from airtest.core.android import Android
from poco.drivers.android.uiautomation import AndroidUiautomationPoco
poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=False)
using("../MacOS/element.air")
from element import *
auto_setup(__file__)
class testaa():
def swipe_up():
#使用这个方法一定要导入 from airtest.core.android import Android
width,height=device().get_current_resolution()
x1=width * 0.5
y1=height* 0.75
y2=height* 0.55
#滑动的时候之前一直有误区,以为要先poco,找到元素才能滑,事实上直接使用函数就可以直接滑
swipe([x1, y1], [x1, y2],duration=2.0)
aa = testaa
aa.swipe_up()