Created
January 21, 2016 09:12
-
-
Save tikolakin/34dc8ddfd38a6689e122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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