| @@ 137-144 (lines=8) @@ | ||
| 134 | * |
|
| 135 | * @When (I )hover :element |
|
| 136 | */ |
|
| 137 | public function iHoverIShouldSeeIn($element) |
|
| 138 | { |
|
| 139 | $node = $this->getSession()->getPage()->find('css', $element); |
|
| 140 | if ($node === null) { |
|
| 141 | throw new \Exception("The hovered element '$element' was not found anywhere in the page"); |
|
| 142 | } |
|
| 143 | $node->mouseOver(); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Save value of the field in parameters array |
|
| @@ 292-302 (lines=11) @@ | ||
| 289 | * |
|
| 290 | * @Then the element :element should be enabled |
|
| 291 | */ |
|
| 292 | public function theElementShouldBeEnabled($element) |
|
| 293 | { |
|
| 294 | $node = $this->getSession()->getPage()->find('css', $element); |
|
| 295 | if ($node === null) { |
|
| 296 | throw new \Exception("There is no '$element' element"); |
|
| 297 | } |
|
| 298 | ||
| 299 | if ($node->hasAttribute('disabled')) { |
|
| 300 | throw new \Exception("The element '$element' is not enabled"); |
|
| 301 | } |
|
| 302 | } |
|
| 303 | ||
| 304 | /** |
|
| 305 | * Checks, that element with given CSS is disabled |
|