| @@ 128-135 (lines=8) @@ | ||
| 125 | * |
|
| 126 | * @When (I )hover :element |
|
| 127 | */ |
|
| 128 | public function iHoverIShouldSeeIn($element) |
|
| 129 | { |
|
| 130 | $node = $this->getSession()->getPage()->find('css', $element); |
|
| 131 | if ($node === null) { |
|
| 132 | throw new \Exception("The hovered element '$element' was not found anywhere in the page"); |
|
| 133 | } |
|
| 134 | $node->mouseOver(); |
|
| 135 | } |
|
| 136 | ||
| 137 | /** |
|
| 138 | * Save value of the field in parameters array |
|
| @@ 320-330 (lines=11) @@ | ||
| 317 | * |
|
| 318 | * @Then the element :element should be enabled |
|
| 319 | */ |
|
| 320 | public function theElementShouldBeEnabled($element) |
|
| 321 | { |
|
| 322 | $node = $this->getSession()->getPage()->find('css', $element); |
|
| 323 | if ($node === null) { |
|
| 324 | throw new \Exception("There is no '$element' element"); |
|
| 325 | } |
|
| 326 | ||
| 327 | if ($node->hasAttribute('disabled')) { |
|
| 328 | throw new \Exception("The element '$element' is not enabled"); |
|
| 329 | } |
|
| 330 | } |
|
| 331 | ||
| 332 | /** |
|
| 333 | * Checks, that element with given CSS is disabled |
|