| @@ 118-125 (lines=8) @@ | ||
| 115 | * |
|
| 116 | * @When (I )hover :element |
|
| 117 | */ |
|
| 118 | public function iHoverIShouldSeeIn($element) |
|
| 119 | { |
|
| 120 | $node = $this->getSession()->getPage()->find('css', $element); |
|
| 121 | if ($node === null) { |
|
| 122 | throw new \Exception("The hovered element '$element' was not found anywhere in the page"); |
|
| 123 | } |
|
| 124 | $node->mouseOver(); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Save value of the field in parameters array |
|
| @@ 273-283 (lines=11) @@ | ||
| 270 | * |
|
| 271 | * @Then the element :element should be enabled |
|
| 272 | */ |
|
| 273 | public function theElementShouldBeEnabled($element) |
|
| 274 | { |
|
| 275 | $node = $this->getSession()->getPage()->find('css', $element); |
|
| 276 | if ($node === null) { |
|
| 277 | throw new \Exception("There is no '$element' element"); |
|
| 278 | } |
|
| 279 | ||
| 280 | if ($node->hasAttribute('disabled')) { |
|
| 281 | throw new \Exception("The element '$element' is not enabled"); |
|
| 282 | } |
|
| 283 | } |
|
| 284 | ||
| 285 | /** |
|
| 286 | * Checks, that element with given CSS is disabled |
|