src/Concerns/WaitsForElements.php
public function waitForText($text, $seconds = null)
    {
        $text = Arr::wrap($text);

        $message = $this->formatTimeOutMessage('Waited %s seconds for text', implode("', '", $text));

        return $this->waitUsing($seconds, 100, function () use ($text) {
            return Str::contains($this->resolver->findOrFail('')->getText(), $text);
        }, $message);
    }
public function waitForText($text, $seconds = null)
    {
        $text = Arr::wrap($text);

        $message = $this->formatTimeOutMessage('Waited %s seconds for text', implode("', '", $text));

        return $this->waitUsing($seconds, 100, function () use ($text) {
            return Str::contains($this->resolver->findOrFail('')->getText(), $text);
        }, $message);
    }
public function waitForText ( $ text , $ seconds = null ) { $ text = Arr :: wrap ( $ text ) ; $ message = $ this -> formatTimeOutMessage ( 'Waited %s seconds for text' , implode ( "', '" , $ text ) ) ; return $ this -> waitUsing ( $ seconds , 100 , function ( ) use ( $ text ) { return Str :: contains ( $ this -> resolver -> findOrFail ( '' ) -> getText ( ) , $ text ) ; } , $ message ) ; }
Wait for the given text to be visible.

@param  array|string  $text
@param  int  $seconds
@return $this
@throws \Facebook\WebDriver\Exception\TimeOutException
Wait for the given text to be visible .