You are here

public function TestSubContext::hoverOverElement in Panopoly 8.2

Hovers over the given CSS selector.

@When I hover over :selector

File

modules/panopoly/panopoly_test/behat/steps/panopoly_test.behat.inc, line 1163
Provide Behat step-definitions for generic Panopoly tests.

Class

TestSubContext
Behat sub-context for Panopoly.

Code

public function hoverOverElement($selector) {
  $page = $this
    ->getSession()
    ->getPage();
  $element = $page
    ->find('css', $selector);
  if ($element === NULL) {
    throw new \Exception("Unable to find element '{$selector}'");
  }
  $element
    ->mouseOver();
}