3 namespace Zumba\Mink\Driver;
5 use Behat\Mink\Exception\DriverException;
9 * @package Zumba\Mink\Driver
14 * Generates a mouseover event on the given element by xpath
15 * @param string $xpath
16 * @throws DriverException
18 public function mouseOver($xpath) {
19 $element = $this->findElement($xpath, 1);
20 $this->browser->hover($element["page_id"], $element["ids"][0]);
24 * Clicks if possible on an element given by xpath
25 * @param string $xpath
27 * @throws DriverException
29 public function click($xpath) {
30 $elements = $this->findElement($xpath, 1);
31 $this->browser->click($elements["page_id"], $elements["ids"][0]);
38 * Double click on element found via xpath
39 * @param string $xpath
40 * @throws DriverException
42 public function doubleClick($xpath) {
43 $elements = $this->findElement($xpath, 1);
44 $this->browser->doubleClick($elements["page_id"], $elements["ids"][0]);
48 * Right click on element found via xpath
49 * @param string $xpath
50 * @throws DriverException
52 public function rightClick($xpath) {
53 $elements = $this->findElement($xpath, 1);
54 $this->browser->rightClick($elements["page_id"], $elements["ids"][0]);