Not able to maximize Chrome Window in headless mode

Since you’re running tests in a headless mode, there is no active browser window available. As such your driver.driver.manage().window().maximize() would always fail in such situations because the driver doesn’t know which window to maximize since there aren’t any available. You can either follow what @DebanjanB has mentioned or you can start the headless browser with … Read more