lib/WebDriverWindow.php
public function setScreenOrientation($orientation)
    {
        $orientation = mb_strtoupper($orientation);
        if (!in_array($orientation, ['PORTRAIT', 'LANDSCAPE'])) {
            throw new IndexOutOfBoundsException(
                'Orientation must be either PORTRAIT, or LANDSCAPE'
            );
        }

        $this->executor->execute(
            DriverCommand::SET_SCREEN_ORIENTATION,
            ['orientation' => $orientation]
        );

        return $this;
    }
public function setScreenOrientation($orientation)
    {
        $orientation = mb_strtoupper($orientation);
        if (!in_array($orientation, ['PORTRAIT', 'LANDSCAPE'])) {
            throw new IndexOutOfBoundsException(
                'Orientation must be either PORTRAIT, or LANDSCAPE'
            );
        }

        $this->executor->execute(
            DriverCommand::SET_SCREEN_ORIENTATION,
            ['orientation' => $orientation]
        );

        return $this;
    }
public function setScreenOrientation ( $ orientation ) { $ orientation = mb_strtoupper ( $ orientation ) ; if ( ! in_array ( $ orientation , [ 'PORTRAIT' , 'LANDSCAPE' ] ) ) { throw new IndexOutOfBoundsException ( 'Orientation must be either PORTRAIT, or LANDSCAPE' ) ; } $ this -> executor -> execute ( DriverCommand :: SET_SCREEN_ORIENTATION , [ 'orientation' => $ orientation ] ) ; return $ this ; }
Set the browser orientation. The orientation should either
LANDSCAPE|PORTRAIT

@param string $orientation
@throws IndexOutOfBoundsException
@return WebDriverWindow The instance.
Set the browser orientation . The orientation should either LANDSCAPE|PORTRAIT