Code Duplication    Length = 8-11 lines in 2 locations

src/Context/BrowserContext.php 2 locations

@@ 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
@@ 298-308 (lines=11) @@
295
     *
296
     * @Then the element :element should be enabled
297
     */
298
    public function theElementShouldBeEnabled($element)
299
    {
300
        $node = $this->getSession()->getPage()->find('css', $element);
301
        if ($node === null) {
302
            throw new \Exception("There is no '$element' element");
303
        }
304
305
        if ($node->hasAttribute('disabled')) {
306
            throw new \Exception("The element '$element' is not enabled");
307
        }
308
    }
309
310
    /**
311
     * Checks, that element with given CSS is disabled