lib/WebDriverWindow.php
public function setSize(WebDriverDimension $size)
    {
        $params = [
            'width' => $size->getWidth(),
            'height' => $size->getHeight(),
            ':windowHandle' => 'current',
        ];
        $this->executor->execute(DriverCommand::SET_WINDOW_SIZE, $params);

        return $this;
    }
public function setSize(WebDriverDimension $size)
    {
        $params = [
            'width' => $size->getWidth(),
            'height' => $size->getHeight(),
            ':windowHandle' => 'current',
        ];
        $this->executor->execute(DriverCommand::SET_WINDOW_SIZE, $params);

        return $this;
    }
public function setSize ( WebDriverDimension $ size ) { $ params = [ 'width' => $ size -> getWidth ( ) , 'height' => $ size -> getHeight ( ) , ':windowHandle' => 'current' , ] ; $ this -> executor -> execute ( DriverCommand :: SET_WINDOW_SIZE , $ params ) ; return $ this ; }
Set the size of the current window. This will change the outer window
dimension, not just the view port.

@param WebDriverDimension $size
@return WebDriverWindow The instance.
Set the size of the current window . This will change the outer window dimension not just the view port .