src/Browser.php
public function withinFrame($selector, Closure $callback)
    {
        $this->driver->switchTo()->frame($this->resolver->findOrFail($selector));

        $callback($this);

        $this->driver->switchTo()->defaultContent();

        return $this;
    }
public function withinFrame($selector, Closure $callback)
    {
        $this->driver->switchTo()->frame($this->resolver->findOrFail($selector));

        $callback($this);

        $this->driver->switchTo()->defaultContent();

        return $this;
    }
public function withinFrame ( $ selector , Closure $ callback ) { $ this -> driver -> switchTo ( ) -> frame ( $ this -> resolver -> findOrFail ( $ selector ) ) ; $ callback ( $ this ) ; $ this -> driver -> switchTo ( ) -> defaultContent ( ) ; return $ this ; }
Switch to a specified frame in the browser and execute the given callback.

@param  string  $selector
@param  \Closure  $callback
@return $this
Switch to a specified frame in the browser and execute the given callback .