JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("require('electron').remote.BrowserWindow.getFocusedWindow().maximize();");