appium滑动
作者:互联网
导入TouchAction
from appium.webdriver.common.touch_action import TouchAction
# 滑动
def test_scroll(self):
# 获取窗口大小,返回一个字典{'width': 1080, 'height': 1920}
size=self.driver.get_window_size()
# 长按滑动释放
TouchAction(self.driver).long_press(x=size['width']*0.5,y=size['height']*0.8)\
.move_to(x=size['width']*0.5,y=size['height']*0.2)\
.release()\
.perform()
标签:appium,TouchAction,self,height,width,滑动,size 来源: https://www.cnblogs.com/Uni-Hoang/p/13764432.html