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