src/Concerns/InteractsWithPages.php
public function within($element, Closure $callback)
    {
        $this->subCrawlers[] = $this->crawler()->filter($element);

        $callback();

        array_pop($this->subCrawlers);

        return $this;
    }
public function within($element, Closure $callback)
    {
        $this->subCrawlers[] = $this->crawler()->filter($element);

        $callback();

        array_pop($this->subCrawlers);

        return $this;
    }
public function within ( $ element , Closure $ callback ) { $ this -> subCrawlers [ ] = $ this -> crawler ( ) -> filter ( $ element ) ; $ callback ( ) ; array_pop ( $ this -> subCrawlers ) ; return $ this ; }
Narrow the test content to a specific area of the page.

@param  string  $element
@param  \Closure  $callback
@return $this
Narrow the test content to a specific area of the page .