Files
oil/server-tp6/vendor/php-webdriver/webdriver/lib/Interactions/Touch/WebDriverTouchAction.php
T
2026-09-01 22:15:50 +08:00

39 lines
895 B
PHP

<?php
namespace Facebook\WebDriver\Interactions\Touch;
use Facebook\WebDriver\Interactions\Internal\WebDriverCoordinates;
use Facebook\WebDriver\Internal\WebDriverLocatable;
/**
* Base class for all touch-related actions.
*/
abstract class WebDriverTouchAction
{
/**
* @var WebDriverTouchScreen
*/
protected $touchScreen;
/**
* @var WebDriverLocatable
*/
protected $locationProvider;
public function __construct(
WebDriverTouchScreen $touch_screen,
WebDriverLocatable $location_provider = null
) {
$this->touchScreen = $touch_screen;
$this->locationProvider = $location_provider;
}
/**
* @return null|WebDriverCoordinates
*/
protected function getActionLocation()
{
return $this->locationProvider !== null
? $this->locationProvider->getCoordinates() : null;
}
}