lib/WebDriverExpectedCondition.php
public static function elementValueContains(WebDriverBy $by, $text)
    {
        return new static(
            function (WebDriver $driver) use ($by, $text) {
                try {
                    $element_text = $driver->findElement($by)->getAttribute('value');

                    return mb_strpos($element_text, $text) !== false;
                } catch (StaleElementReferenceException $e) {
                    return null;
                }
            }
        );
    }
public static function elementValueContains(WebDriverBy $by, $text)
    {
        return new static(
            function (WebDriver $driver) use ($by, $text) {
                try {
                    $element_text = $driver->findElement($by)->getAttribute('value');

                    return mb_strpos($element_text, $text) !== false;
                } catch (StaleElementReferenceException $e) {
                    return null;
                }
            }
        );
    }
public static function elementValueContains ( WebDriverBy $ by , $ text ) { return new static ( function ( WebDriver $ driver ) use ( $ by , $ text ) { try { $ element_text = $ driver -> findElement ( $ by ) -> getAttribute ( 'value' ) ; return mb_strpos ( $ element_text , $ text ) !== false ; } catch ( StaleElementReferenceException $ e ) { return null ; } } ) ; }
An expectation for checking if the given text is present in the specified elements value attribute.

@param WebDriverBy $by The locator used to find the element.
@param string $text The text to be presented in the element value.
@return static Condition returns whether the text is present in value attribute.
An expectation for checking if the given text is present in the specified elements value attribute .