public function fieldExists($field, TraversableElement $container = null)
    {
        $container = $container ?: $this->session->getPage();
        $node = $container->findField($field);

        if (null === $node) {
            throw new ElementNotFoundException($this->session->getDriver(), 'form field', 'id|name|label|value', $field);
        }

        return $node;
    }
public function fieldExists($field, TraversableElement $container = null)
    {
        $container = $container ?: $this->session->getPage();
        $node = $container->findField($field);

        if (null === $node) {
            throw new ElementNotFoundException($this->session->getDriver(), 'form field', 'id|name|label|value', $field);
        }

        return $node;
    }
public function fieldExists ( $ field , TraversableElement $ container = null ) { $ container = $ container ? : $ this -> session -> getPage ( ) ; $ node = $ container -> findField ( $ field ) ; if ( null === $ node ) { throw new ElementNotFoundException ( $ this -> session -> getDriver ( ) , 'form field' , 'id|name|label|value' , $ field ) ; } return $ node ; }
Checks that specific field exists on the current page.

@param string             $field     field id|name|label|value
@param TraversableElement $container document to check against

@return NodeElement

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