How to maximize the window in Selenium

Java

In Java, the Webdriver’s manage() method returns an Options object, which has a window() method that returns a Window.
Window has a Maximize() method.

driver.manage().window().maximize();

Python

In Python, the Webdriver has a maximize_window() method.

driver.maximize_window()

C#

In C#, the Webdriver’s Manage() method returns an IOptions object, which has a Window() method that returns an IWindow.
IWindow has a Maximize() method.

driver.Manage().Window.Maximize();