Here is the code snippet I am working with:
const mainScreen = electron.screen.getPrimaryDisplay();
const windowHeight = mainScreen.size.height;
const windowWidth = mainScreen.size.width;
driver.manage().window().setRect({width: windowWidth, height: windowHeight, x: 0, y: 0});
driver.get('http://www.google.com');
But there are two issues that I'm facing:
- The chrome window resizes after google.com loads instead of resizing when the window first appears.
- The window is too tall (due to the windows bottom bar) and it's not wide enough - leaving space on the left and right sides: