Is there a way to maximize the chrome browser window using python selenium WebDriver?
Note: I am using Chrome Driver 23.0 Any solution on this would be greatly appreciat
I do the following:
from selenium import webdriver
browser = webdriver.Chrome('C:\chromedriver.exe')
browser.maximize_window()
Based on what Janek answered, this worked for me (Linux):
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("--start-maximized")
driver = webdriver.Chrome(chrome_options=options)
For MAC or Linux:
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--kiosk");
driver = new ChromeDriver(chromeOptions);
For Windows:
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
driver = new ChromeDriver(chromeOptions);