function Selenium2Driver::doMouseOver
2 calls to Selenium2Driver::doMouseOver()
- Selenium2Driver::clickOnElement in vendor/
lullabot/ mink-selenium2-driver/ src/ Selenium2Driver.php - Selenium2Driver::mouseOver in vendor/
lullabot/ mink-selenium2-driver/ src/ Selenium2Driver.php - Simulates a mouse over on the element.
File
-
vendor/
lullabot/ mink-selenium2-driver/ src/ Selenium2Driver.php, line 964
Class
- Selenium2Driver
- Selenium2 driver.
Namespace
Behat\Mink\DriverCode
private function doMouseOver(Element $element) : void {
if ($this->isW3C()) {
// Firefox needs the element in view in order to move the pointer to
// it.
$this->scrollElementIntoView($element);
$actions = array(
'actions' => [
[
'type' => 'pointer',
'id' => 'mouse1',
'parameters' => [
'pointerType' => 'mouse',
],
'actions' => [
[
'type' => 'pointerMove',
'duration' => 0,
'origin' => [
Element::WEB_ELEMENT_ID => $element->getID(),
],
'x' => 0,
'y' => 0,
],
],
],
],
);
$this->getWebDriverSession()
->postActions($actions);
$this->getWebDriverSession()
->deleteActions();
}
else {
$this->getWebDriverSession()
->moveto(array(
'element' => $element->getID(),
));
}
}