Skip to content

Instantly share code, notes, and snippets.

@tikolakin
Created January 21, 2016 09:12
Show Gist options
  • Save tikolakin/34dc8ddfd38a6689e122 to your computer and use it in GitHub Desktop.
Save tikolakin/34dc8ddfd38a6689e122 to your computer and use it in GitHub Desktop.
/**
* Perform mouse hover over specific link or element selector
*
* @Given I hover mouse over :element_link in the :name region
*/
public function hoverMouseOver($element_link, $region) {
$region_obj = $this->getRegion($region);
$el = $region_obj->findLink($element_link);
if(!$el instanceof NodeElement){
$el = $this->findByCssIdOneElement($element_link);
if(!$el instanceof NodeElement) {
throw new Exception(sprintf('No link "%s" on the page %s', $element_link, $this->getSession()->getCurrentUrl()));
}
}
$el->mouseOver();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment