function Selenium2Driver::doubleClick
Overrides CoreDriver::doubleClick
File
-
vendor/
lullabot/ mink-selenium2-driver/ src/ Selenium2Driver.php, line 864
Class
- Selenium2Driver
- Selenium2 driver.
Namespace
Behat\Mink\DriverCode
public function doubleClick(string $xpath) {
if ($this->isW3C()) {
$actions = array(
'actions' => [
[
'type' => 'pointer',
'id' => 'mouse1',
'parameters' => [
'pointerType' => 'mouse',
],
'actions' => [
[
'type' => 'pointerMove',
'duration' => 0,
'origin' => [
Element::WEB_ELEMENT_ID => $this->findElement($xpath)
->getID(),
],
'x' => 0,
'y' => 0,
],
[
'type' => 'pointerDown',
"button" => 0,
],
[
'type' => 'pointerUp',
"button" => 0,
],
[
'type' => 'pause',
'duration' => 10,
],
[
'type' => 'pointerDown',
"button" => 0,
],
[
'type' => 'pointerUp',
"button" => 0,
],
],
],
],
);
$this->getWebDriverSession()
->postActions($actions);
$this->getWebDriverSession()
->deleteActions();
}
else {
$this->mouseOver($xpath);
$this->getWebDriverSession()
->doubleclick();
}
}