1<?php 2 3namespace Facebook\WebDriver\Interactions\Touch; 4 5use Facebook\WebDriver\WebDriverAction; 6use Facebook\WebDriver\WebDriverElement; 7 8class WebDriverFlickFromElementAction extends WebDriverTouchAction implements WebDriverAction 9{ 10 /** 11 * @var int 12 */ 13 private $x; 14 /** 15 * @var int 16 */ 17 private $y; 18 /** 19 * @var int 20 */ 21 private $speed; 22 23 /** 24 * @param WebDriverTouchScreen $touch_screen 25 * @param WebDriverElement $element 26 * @param int $x 27 * @param int $y 28 * @param int $speed 29 */ 30 public function __construct( 31 WebDriverTouchScreen $touch_screen, 32 WebDriverElement $element, 33 $x, 34 $y, 35 $speed 36 ) { 37 $this->x = $x; 38 $this->y = $y; 39 $this->speed = $speed; 40 parent::__construct($touch_screen, $element); 41 } 42 43 public function perform() 44 { 45 $this->touchScreen->flickFromElement( 46 $this->locationProvider, 47 $this->x, 48 $this->y, 49 $this->speed 50 ); 51 } 52} 53