Scroll on the touch screen using finger based motion events. Use this command to start scrolling at a particular
screen location.

@param int $xOffset
@param int $yOffset
@return $this
@throws WebDriver_Exception
@throws WebDriver_NoSeleniumException
186240
public function scroll($xOffset, $yOffset)
    {
        $command = $this->webDriver->getDriver()->factoryCommand(
            'touch/scroll',
            WebDriver_Command::METHOD_POST,
            [
                'element' => $this->element->getElementId(),
                'xoffset' => (int) $xOffset,
                'yoffset' => (int) $yOffset,
            ]
        );
        $this->webDriver->getDriver()->curl($command);
        return $this;
    }
809892
public function swipe($xSpeed, $ySpeed)
    {
        $this->webDriver->getDriver()->curl(
            $this->webDriver->getDriver()->factoryCommand(
                'touch/flick',
                WebDriver_Command::METHOD_POST,
                [
                    'xspeed' => (int) $xSpeed,
                    'yspeed' => (int) $ySpeed,
                ]
            )
        );
        return $this;
    }
783639
@Override
    public T setOffset(final double x, final double y)
    {
        getAttributes().setOffset(x, y);

        return cast();
    }
54810
private function buildOffset() {
        $start = $this->getRequest()->getQuery('start', 'int', 0); //If you don't pass in, 0, min 0
        if($start < 0) {
            $start = 0;
        }
        $this->setOffset($start);
    }
370935
def setOffset(self, viewID, x, y):
        
        self._connection._beginMessage(
            tc.CMD_SET_GUI_VARIABLE, tc.VAR_VIEW_OFFSET, viewID, 1 + 8 + 8)
        self._connection._string += struct.pack("!Bdd", tc.POSITION_2D, x, y)
        self._connection._sendExact()
1191974
function setSegment($pathOffset)
    {
        if (is_int($pathOffset))
            $pathOffset = array($pathOffset, null);


        if (!is_array($pathOffset) && count($pathOffset) !==2)
            throw new \InvalidArgumentException(sprintf(
                'Segment is an array [$offset, $length]; given: (%s).'
                , \Poirot\Std\flatten($pathOffset)
            ));

        $this->pathOffset = $pathOffset;
        return $this;
    }
885289
function makeScrollEvents($el) {
  if ($el._data._scrollEvents) return;
  $el._data._scrollEvents = true;

  let ticking = false;
  let top = null;

  function tick() {
    let newTop = $el.scrollTop;
    if (newTop == top) { ticking = false; return; }

    top = newTop;
    $el.trigger('scroll', { top });
    // TODO Scroll should trigger mousemove events.
    window.requestAnimationFrame(tick);
  }

  function scroll() {
    if (!ticking) window.requestAnimationFrame(tick);
    ticking = true;
  }

  // Mouse Events
  let target = $el instanceof Elements.WindowElement ? window : $el._el;
  target.addEventListener('scroll', scroll);

  // Touch Events
  function touchStart() {
    window.addEventListener('touchmove', scroll);
    window.addEventListener('touchend', touchEnd);
  }
  function touchEnd() {
    window.removeEventListener('touchmove', scroll);
    window.removeEventListener('touchend', touchEnd);
  }

  $el._el.addEventListener('touchstart', function(e) {
    if (!e.handled) touchStart();
  });
}
196968
public function down($x, $y)
    {
        $this->webDriver->getDriver()->curl(
            $this->webDriver->getDriver()->factoryCommand(
                'touch/down',
                WebDriver_Command::METHOD_POST,
                [
                    'x' => (int) $x,
                    'y' => (int) $y,
                ]
            )
        );
        return $this;
    }
472367
public function getOffsetWithDefault(?string $cursor, int $defaultOffset): int
    {
        if (empty($cursor)) {
            return $defaultOffset;
        }
        $offset = $this->cursorToOffset($cursor);

        return !\is_numeric($offset) ? $defaultOffset : (int) $offset;
    }
402268
public function moveByOffset($x_offset, $y_offset)
    {
        $this->action->addAction(
            new WebDriverMoveToOffsetAction($this->mouse, null, $x_offset, $y_offset)
        );

        return $this;
    }
1234727
public void fakeDragBy(float yOffset) {
        if (!mFakeDragging) {
            throw new IllegalStateException("No fake drag in progress. Call beginFakeDrag first.");
        }

        mLastMotionY += yOffset;

        float oldScrollY = getScrollY();
        float scrollY = oldScrollY - yOffset;
        final int height = getClientHeight();

        float topBound = height * mFirstOffset;
        float bottomBound = height * mLastOffset;

        final ItemInfo firstItem = mItems.get(0);
        final ItemInfo lastItem = mItems.get(mItems.size() - 1);
        if (firstItem.position != 0) {
            topBound = firstItem.offset * height;
        }
        if (lastItem.position != mAdapter.getCount() - 1) {
            bottomBound = lastItem.offset * height;
        }

        if (scrollY < topBound) {
            scrollY = topBound;
        } else if (scrollY > bottomBound) {
            scrollY = bottomBound;
        }
        // Don't lose the rounded component
        mLastMotionY += scrollY - (int) scrollY;
        scrollTo(getScrollX(), (int) scrollY);
        pageScrolled((int) scrollY);

        // Synthesize an event for the VelocityTracker.
        final long time = SystemClock.uptimeMillis();
        final MotionEvent ev = MotionEvent.obtain(mFakeDragBeginTime, time, MotionEvent.ACTION_MOVE,
                0, mLastMotionY, 0);
        mVelocityTracker.addMovement(ev);
        ev.recycle();
    }
697717
public static void moveBandsElemnts(int yOffset, JRDesignBand band) {
		if (band == null)
			return;

		for (JRChild jrChild : band.getChildren()) {
			JRDesignElement elem = (JRDesignElement) jrChild;
			elem.setY(elem.getY() + yOffset);
		}
	}
128399
public function switchToNextTab($offset = 1)
    {
        $tab = $this->getRelativeTabHandle($offset);
        $this->webDriver->switchTo()->window($tab);
    }
604999
public function flickFromElement(WebDriverElement $element, $xoffset, $yoffset, $speed)
    {
        $this->executor->execute(DriverCommand::TOUCH_FLICK, [
            'xoffset' => $xoffset,
            'yoffset' => $yoffset,
            'element' => $element->getID(),
            'speed' => $speed,
        ]);

        return $this;
    }
382307
public function flick($xspeed, $yspeed)
    {
        $this->executor->execute(DriverCommand::TOUCH_FLICK, [
            'xspeed' => $xspeed,
            'yspeed' => $yspeed,
        ]);

        return $this;
    }
1360614
public static function getOffsetWithDefault($cursor, $defaultOffset)
    {
        if ($cursor == null){
            return $defaultOffset;
        }
        $offset = self::cursorToOffset($cursor);
        return $offset !== null ? $offset: $defaultOffset;
    }
1221844
public TouchActions scroll(WebElement onElement, int xOffset, int yOffset) {
    if (touchScreen != null) {
      action.addAction(new ScrollAction(touchScreen, (Locatable) onElement, xOffset, yOffset));
    }
    return this;
  }