# swipe

  • TypeScript
  • Python
var c = octopus("10.222.50.39:8080")
var {device,img} = c
device.bindDevices(['ca829b6'])

  • # swipe()

  • TypeScript
  • Python
// @method 滑动,中间抬起
// @param points [{x:0.05,y:0.5},{x:0.95,y:0.5},...]
// @param uuids 设备列表
swipe.swipe([{x:0.05,y:0.5},{x:0.95,y:0.5}]) // 右滑翻页

  • # smoothSwipe()

  • TypeScript
  • Python
// @method 滑动,中间不抬起
// @param points [{x:0.05,y:0.5},{x:0.95,y:0.5},...]
// @param uuids 设备列表
swipe.smoothSwipe([{x:0.05,y:0.5},{x:0.95,y:0.5}]) // 右滑翻页

  • # verticalRoll()

  • TypeScript
  • Python
// @method 中间点上下垂直滑动
// @param extent 滑动百分比,0.2:从(0.5,0.5)滑动到(0.5,0.3)
// @param uuids 设备列表
swipe.verticalRoll(0.2)
Last Updated: 12/9/2020, 2:57:16 PM