public function elementExists($selectorType, $selector, ElementInterface $container = null)
    {
        $container = $container ?: $this->session->getPage();
        $node = $container->find($selectorType, $selector);

        if (null === $node) {
            if (is_array($selector)) {
                $selector = implode(' ', $selector);
            }

            throw new ElementNotFoundException($this->session->getDriver(), 'element', $selectorType, $selector);
        }

        return $node;
    }
public function elementExists($selectorType, $selector, ElementInterface $container = null)
    {
        $container = $container ?: $this->session->getPage();
        $node = $container->find($selectorType, $selector);

        if (null === $node) {
            if (is_array($selector)) {
                $selector = implode(' ', $selector);
            }

            throw new ElementNotFoundException($this->session->getDriver(), 'element', $selectorType, $selector);
        }

        return $node;
    }
public function elementExists ( $ selectorType , $ selector , ElementInterface $ container = null ) { $ container = $ container ? : $ this -> session -> getPage ( ) ; $ node = $ container -> find ( $ selectorType , $ selector ) ; if ( null === $ node ) { if ( is_array ( $ selector ) ) { $ selector = implode ( ' ' , $ selector ) ; } throw new ElementNotFoundException ( $ this -> session -> getDriver ( ) , 'element' , $ selectorType , $ selector ) ; } return $ node ; }
Checks that specific element exists on the current page.

@param string           $selectorType element selector type (css, xpath)
@param string|array     $selector     element selector
@param ElementInterface $container    document to check against

@return NodeElement

@throws ElementNotFoundException
Checks that specific element exists on the current page .