Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
peripherad
/
vendor
/
php-webdriver
/
webdriver
/
lib
/
Interactions
/
Internal
:
WebDriverKeysRelatedAction.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php namespace Facebook\WebDriver\Interactions\Internal; use Facebook\WebDriver\Internal\WebDriverLocatable; use Facebook\WebDriver\WebDriverKeyboard; use Facebook\WebDriver\WebDriverMouse; /** * Base class for all keyboard-related actions. */ abstract class WebDriverKeysRelatedAction { /** * @var WebDriverKeyboard */ protected $keyboard; /** * @var WebDriverMouse */ protected $mouse; /** * @var WebDriverLocatable|null */ protected $locationProvider; public function __construct( WebDriverKeyboard $keyboard, WebDriverMouse $mouse, WebDriverLocatable $location_provider = null ) { $this->keyboard = $keyboard; $this->mouse = $mouse; $this->locationProvider = $location_provider; } protected function focusOnElement() { if ($this->locationProvider) { $this->mouse->click($this->locationProvider->getCoordinates()); } } }