1<?php
2
3namespace Facebook\WebDriver\Interactions\Touch;
4
5use Facebook\WebDriver\WebDriverAction;
6
7class WebDriverScrollAction extends WebDriverTouchAction implements WebDriverAction
8{
9    private $x;
10    private $y;
11
12    /**
13     * @param WebDriverTouchScreen $touch_screen
14     * @param int $x
15     * @param int $y
16     */
17    public function __construct(WebDriverTouchScreen $touch_screen, $x, $y)
18    {
19        $this->x = $x;
20        $this->y = $y;
21        parent::__construct($touch_screen);
22    }
23
24    public function perform()
25    {
26        $this->touchScreen->scroll($this->x, $this->y);
27    }
28}
29