src/Constraints/HasValue.php
public function getInputOrTextAreaValue(Crawler $crawler)
    {
        $field = $this->field($crawler);

        return $field->nodeName() == 'input'
            ? $field->attr('value')
            : $field->text();
    }
public function getInputOrTextAreaValue(Crawler $crawler)
    {
        $field = $this->field($crawler);

        return $field->nodeName() == 'input'
            ? $field->attr('value')
            : $field->text();
    }
public function getInputOrTextAreaValue ( Crawler $ crawler ) { $ field = $ this -> field ( $ crawler ) ; return $ field -> nodeName ( ) == 'input' ? $ field -> attr ( 'value' ) : $ field -> text ( ) ; }
Get the value of an input or textarea.

@param  \Symfony\Component\DomCrawler\Crawler  $crawler
@return string

@throws \PHPUnit\Framework\ExpectationFailedException
Get the value of an input or textarea .