driver.manage().window().maximize(); is not working

Viewed 18257

I am using:

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

to maximize the chrome screen, but it is not working and give me a message:

this statement is not getting executed. version of chrome is:Version 62.0.3202.75 (Official Build) (64-bit)

Can anybody help me to solve the issue.

7 Answers

If you need the window to start maximised at launch, use the below code.

System.setProperty("webdriver.chrome.driver",prop.getProperty("driverpath"));
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
WebDriver driver= new ChromeDriver(chromeOptions);

it worked for me -

driver.manage().window().fullscreen();

I have same problem previously, after updating chrmedriver with 2.33 Version resolve the issue, Let a try and let me know

Please download chromedriver 2.33 from this link

Related