Code Duplication    Length = 8-11 lines in 2 locations

src/Context/BrowserContext.php 2 locations

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