YiluphpADB

滑动屏幕

浏览数 64623

/**
 * 滑动屏幕
 * @param  $x1 integer 起始点坐标的x位置
 * @param  $y1 integer 起始点坐标的y位置
 * @param  $x2 integer 结束点坐标的x位置
 * @param  $y2 integer 结束点坐标的y位置
 * @param  $duration integer 滑动过程持续时间,单位为毫秒。把起始点和结束点设置一样的,持续时间长一点可起到长按效果
 * @return boolean 成功返回true,失败抛出异常信息
 * @throws Exception 错误抛出异常信息
 **/
public function swipe($x1, $y1, $x2, $y2, $duration=200){}

我来说说